mirror of
https://github.com/chatmail/core.git
synced 2026-05-03 21:36:29 +03:00
basic w30 sending and receiving
This commit is contained in:
@@ -641,6 +641,11 @@ impl<'a> MimeFactory<'a> {
|
||||
"Content-Type".to_string(),
|
||||
"multipart/report; report-type=multi-device-sync".to_string(),
|
||||
))
|
||||
} else if self.msg.param.get_cmd() == SystemMessage::W30StatusUpdate {
|
||||
PartBuilder::new().header((
|
||||
"Content-Type".to_string(),
|
||||
"multipart/report; report-type=status-update".to_string(),
|
||||
))
|
||||
} else {
|
||||
PartBuilder::new().message_type(MimeMultipartType::Mixed)
|
||||
};
|
||||
@@ -915,7 +920,9 @@ impl<'a> MimeFactory<'a> {
|
||||
"ephemeral-timer-changed".to_string(),
|
||||
));
|
||||
}
|
||||
SystemMessage::LocationOnly | SystemMessage::MultiDeviceSync => {
|
||||
SystemMessage::LocationOnly
|
||||
| SystemMessage::MultiDeviceSync
|
||||
| SystemMessage::W30StatusUpdate => {
|
||||
// This should prevent automatic replies,
|
||||
// such as non-delivery reports.
|
||||
//
|
||||
@@ -1152,6 +1159,14 @@ impl<'a> MimeFactory<'a> {
|
||||
let ids = self.msg.param.get(Param::Arg2).unwrap_or_default();
|
||||
parts.push(context.build_sync_part(json.to_string()).await);
|
||||
self.sync_ids_to_delete = Some(ids.to_string());
|
||||
} else if command == SystemMessage::W30StatusUpdate {
|
||||
let json = self.msg.param.get(Param::Arg).unwrap_or_default();
|
||||
parts.push(context.build_status_update_part(json).await);
|
||||
} else if self.msg.viewtype == Viewtype::W30 {
|
||||
let json = context.get_w30_status_updates(self.msg.id, None).await?;
|
||||
if json != "[]" {
|
||||
parts.push(context.build_status_update_part(&json).await);
|
||||
}
|
||||
}
|
||||
|
||||
if self.attach_selfavatar {
|
||||
|
||||
Reference in New Issue
Block a user