fix: Set Param::Bot for messages on the sender side as well (#5615)

This commit is contained in:
iequidoo
2024-05-26 15:16:02 -03:00
committed by iequidoo
parent d29538beb0
commit adb0dd43a7
2 changed files with 27 additions and 0 deletions

View File

@@ -1932,6 +1932,10 @@ impl Chat {
// reset encrypt error state eg. for forwarding
msg.param.remove(Param::ErroneousE2ee);
let is_bot = context.get_config_bool(Config::Bot).await?;
msg.param
.set_optional(Param::Bot, Some("1").filter(|_| is_bot));
// Set "In-Reply-To:" to identify the message to which the composed message is a reply.
// Set "References:" to identify the "thread" of the conversation.
// Both according to [RFC 5322 3.6.4, page 25](https://www.rfc-editor.org/rfc/rfc5322#section-3.6.4).