feat(backwards-compat): For now, send Chat-Verified header (instead of _verified) again#7349
Merged
feat(backwards-compat): For now, send Chat-Verified header (instead of _verified) again#7349
Conversation
83892fc to
10d1481
Compare
Hocuri
commented
Oct 28, 2025
Comment on lines
+1356
to
+1362
| let send_verified_headers = match chat.typ { | ||
| Chattype::Single => true, | ||
| Chattype::Group => true, | ||
| // Mailinglists and broadcast channels can actually never be verified: | ||
| Chattype::Mailinglist => false, | ||
| Chattype::OutBroadcast | Chattype::InBroadcast => false, | ||
| }; |
Collaborator
Author
There was a problem hiding this comment.
This code was copied from version 2.20.0
Comment on lines
+1366
to
+1369
| .sql | ||
| .query_get_value("SELECT protected FROM chats WHERE id=?", (chat.id,)) | ||
| .await? | ||
| .unwrap_or_default(); |
Collaborator
Author
There was a problem hiding this comment.
This code was also copied from version 2.20.0
Comment on lines
+1375
to
+1379
| "SELECT COUNT(*) | ||
| FROM contacts, chats_contacts | ||
| WHERE chats_contacts.contact_id=contacts.id AND chats_contacts.chat_id=? | ||
| AND contacts.id>9 | ||
| AND contacts.verifier=0", |
Collaborator
Author
There was a problem hiding this comment.
This SQL statement was largely copied from a SQL statement in stats.rs
Comment on lines
+1384
to
+1389
| if !unverified_member_exists { | ||
| headers.push(( | ||
| "Chat-Verified", | ||
| mail_builder::headers::raw::Raw::new("1").into(), | ||
| )); | ||
| } |
Collaborator
Author
There was a problem hiding this comment.
This code was also copied from version 2.20.0
c8dc1a4 to
ce0be05
Compare
link2xt
approved these changes
Oct 29, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In order to prevent this, this PR here sends doesn't send the _verified header anymore.
Unfortunately, this means that for now, verifications are only gossiped in chats that already existed back when we had protected chats, and were protected back then. But this is only temporary; we will soon make this work again.