-
-
Notifications
You must be signed in to change notification settings - Fork 99
fix: Add Chat-Group-Name-Timestamp header and use it to update group names (#6412) #6414
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
Conversation
This definitely needs a rebase now. Or rather a rewrite, seems all the actual logic has been changed. And as mentioned in #6401 (comment) maybe introduce a new header for the change timestamp, then apply last-write-wins logic to the group name. For compatibility with older Delta Chat explict |
ec27e8c
to
8ef3e7e
Compare
cc8f613
to
5630c6e
Compare
5630c6e
to
95776cc
Compare
95776cc
to
b501af0
Compare
src/receive_imf/receive_imf_tests.rs
Outdated
bob_chat_id.accept(&bob).await?; | ||
|
||
// Bob changes the group name. | ||
// TODO: If Bob does this too fast, it's not guaranteed that his group name wins because "Date" |
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'd just remove this TODO. If Bob changes group name shortly after receiving another name, it is basically a simultaneous group change, does not matter who wins.
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.
Btw, now Chat-Group-Name-Timestamp never decreases at least because create_send_msg_jobs()
calls ChatId::update_timestamp()
. This means it may be greater than Date
, but let's not fix this.
Removed TODO, it's not that important indeed
…names (#6412) Add "Chat-Group-Name-Timestamp" message header and use the last-write-wins logic when updating group names (similar to group member timestamps). Note that if the "Chat-Group-Name-Changed" header is absent though, we don't add a system message (`MsgGrpNameChangedBy`) because we don't want to blame anyone.
b501af0
to
bcea9c5
Compare
Fix #6412