mirror of
https://github.com/chatmail/core.git
synced 2026-09-22 13:01:21 +03:00
Fix https://github.com/chatmail/core/issues/8250. Not sure why anyone would tamper with the link, but maybe the name gets ellipsized because it is very long, or maybe we decide to ellipsize more aggressively in the future. The fix is easy enough, just set the GroupNameTimestamp when creating the channel, so that `HeaderDef::ChatGroupNameTimestamp` gets set when sending a message and the logic in `apply_chat_name_avatar_and_description_changes()` recognizes the incoming name's timestamp as newer than `chat_group_name_timestamp` (which is 0 right after joining a chat). The test is somewhat hacky and depends on the title being the last parameter in the invite code URL, but this is fine; if we ever change that, then the test will fail and we need to modify it. This also removes some wrong doc comments. Since groups are unpromoted until sending a first message, the same fix isn't needed for groups.