File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -3728,10 +3728,8 @@ pub(crate) async fn add_contact_to_chat_ex(
3728
3728
msg. param . set_cmd ( SystemMessage :: MemberAddedToGroup ) ;
3729
3729
msg. param . set ( Param :: Arg , contact_addr) ;
3730
3730
msg. param . set_int ( Param :: Arg2 , from_handshake. into ( ) ) ;
3731
- if let Err ( e) = send_msg ( context, chat_id, & mut msg) . await {
3732
- remove_from_chat_contacts_table ( context, chat_id, contact_id) . await ?;
3733
- return Err ( e) ;
3734
- }
3731
+ send_msg ( context, chat_id, & mut msg) . await ?;
3732
+
3735
3733
sync = Nosync ;
3736
3734
// TODO: Remove this compat code needed because Core <= v1.143:
3737
3735
// - doesn't accept synchronization of QR code tokens for unpromoted groups, so we also send
Original file line number Diff line number Diff line change @@ -4931,7 +4931,10 @@ async fn test_protected_group_add_remove_member_missing_key() -> Result<()> {
4931
4931
assert ! ( add_contact_to_chat( alice, group_id, alice_fiona_id)
4932
4932
. await
4933
4933
. is_err( ) ) ;
4934
- assert ! ( !is_contact_in_chat( alice, group_id, alice_fiona_id) . await ?) ;
4934
+ // Sending the message failed,
4935
+ // but member is added to the chat locally already.
4936
+ assert ! ( is_contact_in_chat( alice, group_id, alice_fiona_id) . await ?) ;
4937
+
4935
4938
// Now the chat has a message "You added member fiona@example.net. [INFO] !!" (with error) that
4936
4939
// may be confusing, but if the error is displayed in UIs, it's more or less ok. This is not a
4937
4940
// normal scenario anyway.
You can’t perform that action at this time.
0 commit comments