diff --git a/src/headerdef.rs b/src/headerdef.rs index d46c87d75..d9b1924c7 100644 --- a/src/headerdef.rs +++ b/src/headerdef.rs @@ -124,7 +124,7 @@ pub enum HeaderDef { /// Broadcasted reactions for this or other chat messages. /// See broadcast_reactions.rs for the wire format. - ChatBroadcastReactions, + ChatBroadcastStates, /// [Autocrypt](https://autocrypt.org/) header. Autocrypt, diff --git a/src/mimefactory.rs b/src/mimefactory.rs index e79b22ec5..c16f7c085 100644 --- a/src/mimefactory.rs +++ b/src/mimefactory.rs @@ -1988,7 +1988,7 @@ impl MimeFactory { if let Some(broadcast_reactions) = msg.param.get(Param::BroadcastReactions) { headers.push(( - "Chat-Broadcast-Reactions", + "Chat-Broadcast-States", mail_builder::headers::raw::Raw::new(b_encode(broadcast_reactions)).into(), )); } diff --git a/src/mimeparser.rs b/src/mimeparser.rs index b826ba3bd..d4d6fc7d7 100644 --- a/src/mimeparser.rs +++ b/src/mimeparser.rs @@ -116,7 +116,7 @@ pub(crate) struct MimeMessage { pub(crate) mdn_reports: Vec, pub(crate) delivery_report: Option, - /// 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, @@ -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()); } diff --git a/src/param.rs b/src/param.rs index 95053ec6d..2f1d66894 100644 --- a/src/param.rs +++ b/src/param.rs @@ -73,7 +73,7 @@ pub enum Param { /// For Messages: Render message as a RFC 9078 reaction. Reaction = b'x', - /// For Messages: Additional reactions that go to the `Chat-Broadcast-Reactions:` header + /// For Messages: Additional reactions that go to the `Chat-Broadcast-States:` header BroadcastReactions = b'X', /// For Chats: the timestamp of the last reaction. diff --git a/src/reaction/broadcast_reactions.rs b/src/reaction/broadcast_reactions.rs index 3f6a0e0f0..3077d87be 100644 --- a/src/reaction/broadcast_reactions.rs +++ b/src/reaction/broadcast_reactions.rs @@ -21,7 +21,7 @@ use crate::tools::time; use crate::{EventType, chatlist_events}; /// Wire format for accumulated broadcast reactions -/// (sent as JSON from broadcast channel owner to subscriber in `Chat-Broadcast-Reactions:` header) +/// (sent as JSON from broadcast channel owner to subscriber in `Chat-Broadcast-States:` header) #[derive(Debug, Serialize, Deserialize)] struct WirePayload { messages: Vec, @@ -40,7 +40,7 @@ struct WireEntry { count: usize, } -/// Renders one or more message's reactions as a JSON string, ready to be sent in `Broadcast-Reactions:` header. +/// Renders one or more message's reactions as a JSON string, ready to be sent in `Chat-Broadcast-States:` header. /// /// The returned reaction array for a message may be empty, /// allowing to broadcast reaction removal. @@ -166,7 +166,7 @@ async fn broadcast_reactions_for_one_chat(context: &Context, chat_id: ChatId) -> Ok(()) } -/// Applies incoming, accumulated reactions received via the `Chat-Broadcast-Reactions:` header +/// Applies incoming, accumulated reactions received via the `Chat-Broadcast-States:` header /// to the `broadcasted_reactions` table. pub(crate) async fn receive_broadcast_reactions(context: &Context, json: &str) -> Result<()> { let payload: WirePayload = serde_json::from_str(json)?; @@ -613,7 +613,7 @@ mod tests { // Alice broadcasts recent reaction changes to Bob and Claire. // On the wire, the hidden message has a header like - // `Chat-Broadcast-Reactions: {"messages":[{"id":"123@adc","reactions":[{"emoji":"❤️","count":1}]}]}` + // `Chat-Broadcast-States: {"messages":[{"id":"123@adc","reactions":[{"emoji":"❤️","count":1}]}]}` maybe_broadcast_reactions(alice).await?; let sent_msg = alice.pop_sent_msg().await; bob.recv_msg_hidden(&sent_msg).await;