mirror of
https://github.com/chatmail/core.git
synced 2026-05-19 14:56:33 +03:00
send videochat-url and -invitation also through header
This commit is contained in:
@@ -1636,6 +1636,7 @@ pub async fn send_videochat_invitation(context: &Context, chat_id: ChatId) -> Re
|
|||||||
};
|
};
|
||||||
|
|
||||||
let mut msg = Message::new(Viewtype::VideochatInvitation);
|
let mut msg = Message::new(Viewtype::VideochatInvitation);
|
||||||
|
msg.param.set(Param::VideochatUrl, &url);
|
||||||
msg.text = Some(
|
msg.text = Some(
|
||||||
context
|
context
|
||||||
.stock_string_repl_str(StockMessage::VideochatInviteMsgBody, url)
|
.stock_string_repl_str(StockMessage::VideochatInviteMsgBody, url)
|
||||||
|
|||||||
@@ -875,6 +875,19 @@ impl<'a, 'b> MimeFactory<'a, 'b> {
|
|||||||
|
|
||||||
if self.msg.viewtype == Viewtype::Sticker {
|
if self.msg.viewtype == Viewtype::Sticker {
|
||||||
protected_headers.push(Header::new("Chat-Content".into(), "sticker".into()));
|
protected_headers.push(Header::new("Chat-Content".into(), "sticker".into()));
|
||||||
|
} else if self.msg.viewtype == Viewtype::VideochatInvitation {
|
||||||
|
protected_headers.push(Header::new(
|
||||||
|
"Chat-Content".into(),
|
||||||
|
"videochat-invitation".into(),
|
||||||
|
));
|
||||||
|
protected_headers.push(Header::new(
|
||||||
|
"Chat-Videochat-Url".into(),
|
||||||
|
self.msg
|
||||||
|
.param
|
||||||
|
.get(Param::VideochatUrl)
|
||||||
|
.unwrap_or_default()
|
||||||
|
.into(),
|
||||||
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
if self.msg.viewtype == Viewtype::Voice
|
if self.msg.viewtype == Viewtype::Voice
|
||||||
|
|||||||
@@ -68,6 +68,9 @@ pub enum Param {
|
|||||||
/// For Messages
|
/// For Messages
|
||||||
AttachGroupImage = b'A',
|
AttachGroupImage = b'A',
|
||||||
|
|
||||||
|
/// For Messages
|
||||||
|
VideochatUrl = b'V',
|
||||||
|
|
||||||
/// For Messages: space-separated list of messaged IDs of forwarded copies.
|
/// For Messages: space-separated list of messaged IDs of forwarded copies.
|
||||||
///
|
///
|
||||||
/// This is used when a [crate::message::Message] is in the
|
/// This is used when a [crate::message::Message] is in the
|
||||||
|
|||||||
Reference in New Issue
Block a user