@@ -1725,10 +1725,10 @@ pub(crate) async fn get_webxdc_info_messages(
1725
1725
FROM msgs
1726
1726
WHERE chat_id=?1 AND hidden=0 AND mime_in_reply_to = ?2
1727
1727
"# ,
1728
- ( msg. chat_id , msg. id ) ,
1728
+ ( msg. chat_id , & msg. rfc724_mid ) ,
1729
1729
|row| {
1730
1730
let info_msg_id: MsgId = row. get ( 0 ) ?;
1731
- let last_param: Params = row. get :: < _ , String > ( 2 ) ?. parse ( ) . unwrap_or_default ( ) ;
1731
+ let last_param: Params = row. get :: < _ , String > ( 1 ) ?. parse ( ) . unwrap_or_default ( ) ;
1732
1732
Ok ( ( info_msg_id, last_param) )
1733
1733
} ,
1734
1734
|row| {
@@ -1782,6 +1782,7 @@ pub async fn delete_msgs_ex(
1782
1782
let mut deleted_rfc724_mid = Vec :: new ( ) ;
1783
1783
let mut res = Ok ( ( ) ) ;
1784
1784
let mut msg_ids_queue = VecDeque :: from_iter ( msg_ids. iter ( ) . cloned ( ) ) ;
1785
+ let mut msg_ids = Vec :: from ( msg_ids) ;
1785
1786
1786
1787
while let Some ( msg_id) = msg_ids_queue. pop_front ( ) {
1787
1788
let msg = Message :: load_from_db ( context, msg_id) . await ?;
@@ -1794,7 +1795,11 @@ pub async fn delete_msgs_ex(
1794
1795
"Cannot request deletion of unencrypted message for others"
1795
1796
) ;
1796
1797
1797
- msg_ids_queue. extend ( get_webxdc_info_messages ( context, & msg) . await ?) ;
1798
+ if msg. viewtype == Viewtype :: Webxdc {
1799
+ let info_msgs = get_webxdc_info_messages ( context, & msg) . await ?;
1800
+ msg_ids_queue. extend ( info_msgs. clone ( ) ) ;
1801
+ msg_ids. extend ( info_msgs) ;
1802
+ }
1798
1803
modified_chat_ids. insert ( msg. chat_id ) ;
1799
1804
deleted_rfc724_mid. push ( msg. rfc724_mid . clone ( ) ) ;
1800
1805
@@ -1840,11 +1845,11 @@ pub async fn delete_msgs_ex(
1840
1845
. await ?;
1841
1846
}
1842
1847
1843
- for & msg_id in msg_ids {
1848
+ for & msg_id in msg_ids. iter ( ) {
1844
1849
let msg = Message :: load_from_db ( context, msg_id) . await ?;
1845
1850
delete_msg_locally ( context, & msg) . await ?;
1846
1851
}
1847
- delete_msgs_locally_done ( context, msg_ids, modified_chat_ids) . await ?;
1852
+ delete_msgs_locally_done ( context, & msg_ids, modified_chat_ids) . await ?;
1848
1853
1849
1854
// Interrupt Inbox loop to start message deletion, run housekeeping and call send_sync_msg().
1850
1855
context. scheduler . interrupt_inbox ( ) . await ;
0 commit comments