@@ -2186,9 +2186,6 @@ async fn apply_group_changes(
2186
2186
let is_from_in_chat =
2187
2187
!chat_contacts. contains ( & ContactId :: SELF ) || chat_contacts. contains ( & from_id) ;
2188
2188
2189
- // Whether to rebuild the member list from scratch.
2190
- let recreate_member_list = self_added;
2191
-
2192
2189
if mime_parser. get_header ( HeaderDef :: ChatVerified ) . is_some ( ) {
2193
2190
if let VerifiedEncryption :: NotVerified ( err) = verified_encryption {
2194
2191
warn ! ( context, "Verification problem: {err:#}." ) ;
@@ -2348,7 +2345,7 @@ async fn apply_group_changes(
2348
2345
let mut added_ids = HashSet :: < ContactId > :: new ( ) ;
2349
2346
let mut removed_ids = HashSet :: < ContactId > :: new ( ) ;
2350
2347
2351
- if !recreate_member_list {
2348
+ if !self_added {
2352
2349
if mime_parser. get_header ( HeaderDef :: ChatVersion ) . is_none ( ) {
2353
2350
// Allow non-Delta Chat MUAs to add members.
2354
2351
added_ids = new_members. difference ( & chat_contacts) . copied ( ) . collect ( ) ;
@@ -2366,25 +2363,6 @@ async fn apply_group_changes(
2366
2363
if let Some ( removed_id) = removed_id {
2367
2364
new_members. remove ( & removed_id) ;
2368
2365
}
2369
- if recreate_member_list {
2370
- if self_added {
2371
- // ... then `better_msg` is already set.
2372
- } else if chat. blocked == Blocked :: Request || !chat_contacts. contains ( & ContactId :: SELF )
2373
- {
2374
- warn ! ( context, "Implicit addition of SELF to chat {chat_id}." ) ;
2375
- group_changes_msgs. push (
2376
- stock_str:: msg_add_member_local (
2377
- context,
2378
- & context. get_primary_self_addr ( ) . await ?,
2379
- ContactId :: UNDEFINED ,
2380
- )
2381
- . await ,
2382
- ) ;
2383
- } else {
2384
- added_ids = new_members. difference ( & chat_contacts) . copied ( ) . collect ( ) ;
2385
- removed_ids = chat_contacts. difference ( & new_members) . copied ( ) . collect ( ) ;
2386
- }
2387
- }
2388
2366
2389
2367
if let Some ( added_id) = added_id {
2390
2368
added_ids. remove ( & added_id) ;
0 commit comments