Skip to content

Commit 7252927

Browse files
committed
Check for local member message
1 parent 47857ea commit 7252927

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/receive_imf/tests.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4895,6 +4895,7 @@ async fn test_protected_group_add_remove_member_missing_key() -> Result<()> {
48954895
.await?;
48964896

48974897
let fiona = &tcm.fiona().await;
4898+
let fiona_addr = fiona.get_config(Config::Addr).await?.unwrap();
48984899
mark_as_verified(alice, fiona).await;
48994900
let alice_fiona_id = alice.add_or_lookup_contact(fiona).await.id;
49004901
assert!(add_contact_to_chat(alice, group_id, alice_fiona_id)
@@ -4903,6 +4904,12 @@ async fn test_protected_group_add_remove_member_missing_key() -> Result<()> {
49034904
// Sending the message failed,
49044905
// but member is added to the chat locally already.
49054906
assert!(is_contact_in_chat(alice, group_id, alice_fiona_id).await?);
4907+
let msg = alice.get_last_msg_in(group_id).await;
4908+
assert!(msg.is_info());
4909+
assert_eq!(
4910+
msg.get_text(),
4911+
stock_str::msg_add_member_local(alice, &fiona_addr, ContactId::SELF).await
4912+
);
49064913

49074914
// Now the chat has a message "You added member fiona@example.net. [INFO] !!" (with error) that
49084915
// may be confusing, but if the error is displayed in UIs, it's more or less ok. This is not a

0 commit comments

Comments
 (0)