fix: Don't send ChatGroupId for broadcast channels (#6975)

Older versions of Delta Chat ignore the message if it contains a
ChatGroupId header. ("older versions" means all versions without #6901,
i.e.currently released versions)

This means that without this PR, broadcast channel messages sent from
current main don't arrive at a device running latest released DC.

Part of #6884.
This commit is contained in:
Hocuri
2025-07-07 12:06:54 +02:00
committed by GitHub
parent 35e107e87d
commit aad8f698dd
2 changed files with 11 additions and 2 deletions

View File

@@ -2650,6 +2650,11 @@ async fn test_broadcast() -> Result<()> {
assert!(msg.was_encrypted());
assert!(!msg.header_exists(HeaderDef::ChatGroupMemberTimestamps));
assert!(!msg.header_exists(HeaderDef::AutocryptGossip));
// If we sent a ChatGroupId header,
// older versions of DC would ignore the message
assert!(!msg.header_exists(HeaderDef::ChatGroupId));
let msg = bob.recv_msg(&sent_msg).await;
assert_eq!(msg.get_text(), "ola!");
assert_eq!(msg.subject, "Broadcast channel");