core icon indicating copy to clipboard operation
core copied to clipboard

Order recipients of a message by time of addition

Open hpk42 opened this issue 7 months ago • 2 comments

In larger verified chats (51+ members) it was several times observed that the newly added member can get message from non-verified senders before they see that they got added. This is probably due to the chunking of smtp sent out messages with classic providers (current limit is 50, after which several messages are generated). The newly added member can (or maybe even always?) does not make it into the first chunk, so that existing group members see the addition before the added members sees this addition.
This is probably best fixed by ensuring that added members are always part of the first cunk.

hpk42 avatar May 24 '25 22:05 hpk42

This issue can be fixed on the receiver side instead: https://github.com/chatmail/core/issues/6408

I made a fix at https://github.com/chatmail/core/pull/6883

link2xt avatar May 30 '25 18:05 link2xt

It makes some sense to try to deliver the "member added" to the added user as soon as possible and put the user in the beginning of the recipient list. This way user is less likely to receive messages from other members, including bots, before receiving the "member added".

The other way round, user receiving "member added" and sending a message to the group is less likely, it needs to be some sort of bot that sends a message as soon as added to the group.

We anyway need tests for SMTP queue instead of comments telling to read the other function here: https://github.com/chatmail/core/blob/becb83faf1739c956473be8f4fb66ee7c32656d2/src/chat.rs#L3017-L3024 The origin of the comment is this commit: https://github.com/chatmail/core/commit/625887d249906d5a9eff4a102eb0e194b848a952#diff-b97e58178ed35ccbb3a76d746a67e14e9b9e8c68bf6fd001c9a286701766a8ec

link2xt avatar May 31 '25 20:05 link2xt