File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -2283,13 +2283,15 @@ async fn apply_group_changes(
2283
2283
to_ids. iter ( ) ,
2284
2284
chat_group_member_timestamps. iter ( ) . take ( to_ids. len ( ) ) ,
2285
2285
) {
2286
- transaction. execute (
2287
- "INSERT INTO chats_contacts (chat_id, contact_id, add_timestamp)
2288
- VALUES (?1, ?2, ?3)
2289
- ON CONFLICT (chat_id, contact_id)
2290
- DO UPDATE SET add_timestamp=MAX(add_timestamp, ?3)" ,
2291
- ( chat_id, contact_id, ts) ,
2292
- ) ?;
2286
+ if * contact_id != from_id {
2287
+ transaction. execute (
2288
+ "INSERT INTO chats_contacts (chat_id, contact_id, add_timestamp)
2289
+ VALUES (?1, ?2, ?3)
2290
+ ON CONFLICT (chat_id, contact_id)
2291
+ DO UPDATE SET add_timestamp=MAX(add_timestamp, ?3)" ,
2292
+ ( chat_id, contact_id, ts) ,
2293
+ ) ?;
2294
+ }
2293
2295
}
2294
2296
2295
2297
for ( contact_id, ts) in std:: iter:: zip (
You can’t perform that action at this time.
0 commit comments