use Chat-Broadcast-States: header insted of -Reactions:

the wire format is already prepared to carry information additionally to reactions,
so let the header name reflect that as well.

in practise, we might want to use a `pinned` flag very soon
in case pinned messages got resent in channels.
it makes sense if that flag goes to the message as such,
and not to an extra message.
and then it makes sense to not introduce a new things.

ftr, this is about resending state to other members,
it is not about syncing across devices for the same user.

the code as such is not changed by this PR,
it is only a wording preparation, of a header that is not even visible.
if we semantically put things other than reactions to the wire format,
we may want to move it out of `broadcast_reactions.rs`
This commit is contained in:
B. Petersen
2026-08-05 14:07:29 +02:00
committed by biørn
parent 93d9a4be1c
commit 1247d5da36
5 changed files with 9 additions and 9 deletions

View File

@@ -116,7 +116,7 @@ pub(crate) struct MimeMessage {
pub(crate) mdn_reports: Vec<Report>,
pub(crate) delivery_report: Option<DeliveryReport>,
/// Parsed `Chat-Broadcast-Reactions` header, if any:
/// Parsed `Chat-Broadcast-States` header, if any:
/// accumulated reaction updates sent by a broadcast channel owner.
pub(crate) broadcast_reactions: Option<String>,
@@ -800,7 +800,7 @@ impl MimeMessage {
fn parse_broadcast_reactions_header(&mut self) {
self.broadcast_reactions = self
.get_header(HeaderDef::ChatBroadcastReactions)
.get_header(HeaderDef::ChatBroadcastStates)
.map(|s| s.to_string());
}