Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions src/mimefactory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -411,8 +411,13 @@ impl MimeFactory {
},
)
.await?;
let recipient_ids: Vec<_> = recipient_ids.into_iter().collect();
ContactId::scaleup_origin(context, &recipient_ids, Origin::OutgoingTo).await?;
let recipient_ids: Vec<_> = recipient_ids
.into_iter()
.filter(|id| *id != ContactId::SELF)
.collect();
if recipient_ids.len() == 1 && chat.typ != Chattype::OutBroadcast {
ContactId::scaleup_origin(context, &recipient_ids, Origin::OutgoingTo).await?;
}

if !msg.is_system_message()
&& msg.param.get_int(Param::Reaction).unwrap_or_default() == 0
Expand Down
5 changes: 5 additions & 0 deletions src/receive_imf/receive_imf_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3881,6 +3881,11 @@ async fn test_group_contacts_goto_bottom() -> Result<()> {
let contacts = Contact::get_all(bob, 0, None).await?;
assert_eq!(contacts.len(), 2);
assert_eq!(contacts[0], bob_fiona_id);

send_text_msg(bob, bob_chat_id, "ehlo".to_string()).await?;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick: what does "ehlo" mean? is it a typo or a reference to some SMTP command?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
send_text_msg(bob, bob_chat_id, "ehlo".to_string()).await?;
send_text_msg(bob, bob_chat_id, "Hi Alice, stay down in my contact list".to_string()).await?;

Let's replace it with a self-documenting message to avoid questions

bob.pop_sent_msg().await;
let contacts = Contact::get_all(bob, 0, None).await?;
assert_eq!(contacts[0], bob_fiona_id);
Ok(())
}

Expand Down