File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -1305,6 +1305,12 @@ impl CommandApi {
1305
1305
Ok ( results)
1306
1306
}
1307
1307
1308
+ async fn save_msgs ( & self , account_id : u32 , message_ids : Vec < u32 > ) -> Result < ( ) > {
1309
+ let ctx = self . get_context ( account_id) . await ?;
1310
+ let message_ids: Vec < MsgId > = message_ids. into_iter ( ) . map ( MsgId :: new) . collect ( ) ;
1311
+ chat:: save_msgs ( & ctx, & message_ids) . await
1312
+ }
1313
+
1308
1314
// ---------------------------------------------
1309
1315
// contact
1310
1316
// ---------------------------------------------
Original file line number Diff line number Diff line change @@ -89,6 +89,10 @@ pub struct MessageObject {
89
89
90
90
download_state : DownloadState ,
91
91
92
+ original_msg_id : Option < u32 > ,
93
+
94
+ saved_message_id : Option < u32 > ,
95
+
92
96
reactions : Option < JSONRPCReactions > ,
93
97
94
98
vcard_contact : Option < VcardContact > ,
@@ -253,6 +257,16 @@ impl MessageObject {
253
257
254
258
download_state,
255
259
260
+ original_msg_id : message
261
+ . get_original_msg_id ( context)
262
+ . await ?
263
+ . map ( |id| id. to_u32 ( ) ) ,
264
+
265
+ saved_message_id : message
266
+ . get_saved_msg_id ( context)
267
+ . await ?
268
+ . map ( |id| id. to_u32 ( ) ) ,
269
+
256
270
reactions,
257
271
258
272
vcard_contact : vcard_contacts. first ( ) . cloned ( ) ,
You can’t perform that action at this time.
0 commit comments