xpc: include attachment guids
This commit is contained in:
@@ -155,6 +155,15 @@ pub async fn dispatch(
|
|||||||
dict_put_str(&mut m, "text", &msg.text.replace('\u{FFFC}', ""));
|
dict_put_str(&mut m, "text", &msg.text.replace('\u{FFFC}', ""));
|
||||||
dict_put_i64_as_str(&mut m, "date", msg.date.and_utc().timestamp());
|
dict_put_i64_as_str(&mut m, "date", msg.date.and_utc().timestamp());
|
||||||
dict_put_str(&mut m, "sender", &msg.sender.display_name());
|
dict_put_str(&mut m, "sender", &msg.sender.display_name());
|
||||||
|
|
||||||
|
// Include attachment GUIDs for the client to resolve/download
|
||||||
|
let attachment_guids: Vec<String> = msg
|
||||||
|
.attachments
|
||||||
|
.iter()
|
||||||
|
.map(|a| a.guid.clone())
|
||||||
|
.collect();
|
||||||
|
m.insert(cstr("attachment_guids"), array_from_strs(attachment_guids));
|
||||||
|
|
||||||
items.push(Message::Dictionary(m));
|
items.push(Message::Dictionary(m));
|
||||||
}
|
}
|
||||||
let mut reply: XpcMap = HashMap::new();
|
let mut reply: XpcMap = HashMap::new();
|
||||||
|
|||||||
Reference in New Issue
Block a user