@@ -2153,7 +2153,7 @@ async fn create_group(
2153
2153
async fn update_chats_contacts_timestamps (
2154
2154
context : & Context ,
2155
2155
chat_id : ChatId ,
2156
- from_id : ContactId ,
2156
+ ignored_id : Option < ContactId > ,
2157
2157
to_ids : & [ ContactId ] ,
2158
2158
past_ids : & [ ContactId ] ,
2159
2159
chat_group_member_timestamps : & [ i64 ] ,
@@ -2177,18 +2177,18 @@ async fn update_chats_contacts_timestamps(
2177
2177
. transaction ( |transaction| {
2178
2178
let mut add_statement = transaction. prepare (
2179
2179
"INSERT INTO chats_contacts (chat_id, contact_id, add_timestamp)
2180
- VALUES (?1, ?2, ?3)
2181
- ON CONFLICT (chat_id, contact_id)
2182
- DO
2183
- UPDATE SET add_timestamp=?3
2184
- WHERE ?3>add_timestamp AND ?3>=remove_timestamp" ,
2180
+ VALUES (?1, ?2, ?3)
2181
+ ON CONFLICT (chat_id, contact_id)
2182
+ DO
2183
+ UPDATE SET add_timestamp=?3
2184
+ WHERE ?3>add_timestamp AND ?3>=remove_timestamp" ,
2185
2185
) ?;
2186
2186
2187
2187
for ( contact_id, ts) in iter:: zip (
2188
2188
to_ids. iter ( ) ,
2189
2189
chat_group_member_timestamps. iter ( ) . take ( to_ids. len ( ) ) ,
2190
2190
) {
2191
- if * contact_id != from_id {
2191
+ if Some ( * contact_id) != ignored_id {
2192
2192
// It could be that member was already added,
2193
2193
// but updated addition timestamp
2194
2194
// is also a modification worth notifying about.
@@ -2357,7 +2357,7 @@ async fn apply_group_changes(
2357
2357
2358
2358
if let Some ( ref chat_group_member_timestamps) = mime_parser. chat_group_member_timestamps ( ) {
2359
2359
send_event_chat_modified |=
2360
- update_chats_contacts_timestamps ( context, chat_id, from_id, to_ids, past_ids, & chat_group_member_timestamps)
2360
+ update_chats_contacts_timestamps ( context, chat_id, Some ( from_id) , to_ids, past_ids, & chat_group_member_timestamps)
2361
2361
. await ?;
2362
2362
let new_chat_contacts = HashSet :: < ContactId > :: from_iter (
2363
2363
chat:: get_chat_contacts ( context, chat_id)
0 commit comments