Skip to content

Commit d0f6f3e

Browse files
committed
feat: Don't send Chat-Group-Name* headers for InBroadcast-s
Broadcast subscribers can't change the chat name, so sending the "Chat-Group-Name{,-Timestamp}" headers looks unnecessary. That could be useful for other subscriber's devices, but having only the chat name isn't enough anyway, at least knowing the secret is necessary which is sent by the broadcast owner.
1 parent 5bb0b86 commit d0f6f3e

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

src/mimefactory.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1587,10 +1587,7 @@ impl MimeFactory {
15871587
}
15881588
}
15891589

1590-
if chat.typ == Chattype::Group
1591-
|| chat.typ == Chattype::OutBroadcast
1592-
|| chat.typ == Chattype::InBroadcast
1593-
{
1590+
if chat.typ == Chattype::Group || chat.typ == Chattype::OutBroadcast {
15941591
headers.push((
15951592
"Chat-Group-Name",
15961593
mail_builder::headers::text::Text::new(chat.name.to_string()).into(),
@@ -1601,7 +1598,11 @@ impl MimeFactory {
16011598
mail_builder::headers::text::Text::new(ts.to_string()).into(),
16021599
));
16031600
}
1604-
1601+
}
1602+
if chat.typ == Chattype::Group
1603+
|| chat.typ == Chattype::OutBroadcast
1604+
|| chat.typ == Chattype::InBroadcast
1605+
{
16051606
match command {
16061607
SystemMessage::MemberRemovedFromGroup => {
16071608
let email_to_remove = msg.param.get(Param::Arg).unwrap_or_default();

0 commit comments

Comments
 (0)