-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix group renaming #6699
Fix group renaming #6699
Conversation
2f0ac1d
to
704729f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really understand how the fix fixes the test, since the test doesn't even have multiple devices that would send sync messages. Maybe the comment could be improved to explain this better, maybe it's fine.
src/chat.rs
Outdated
// If the change is received from the sync message, | ||
// do not update timestamp. It may be long after | ||
// the group is promoted. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be good to explain this more extensively, because it took me quite a long time to understand it. E.g.:
// If the change is received from sync message
// do not update timestamp. It may be long after
// the group is promoted.
// (note that `sync == Nosync` would mean
//that the change comes from a sync message)
The bug is not about sync messages. Alice is sending old timestamp so the group name is not updated for Bob. |
The reason of the bug is that
above. Using |
704729f
to
b4217fc
Compare
Still, why don't just move the block updating if recipients.is_empty() {
// may happen eg. for groups with only SELF and bcc_self disabled
info!(
context,
"Message {} has no recipient, skipping smtp-send.", msg.id
);
msg.param.set_int(Param::GuaranteeE2ee, 1);
msg.update_param(context).await?;
msg.id.set_delivered(context).await?;
msg.state = MessageState::OutDelivered;
return Ok(Vec::new());
} which doesn't look good becuse |
b4217fc
to
41df6be
Compare
I have moved it in a separate commit to avoid short-circuit in case of no recipients, but don't see how can it fix the original bug. The problem is with the chat param, not message param, and nothing updates the Chat saved inside the mime parser which is then used when rendering. |
41df6be
to
194ccfd
Compare
Otherwise outdated timestamp is rendered into the message.
7daba40
to
dc2e4df
Compare
194ccfd
to
99a6756
Compare
Fixes #6697
Based on #6711