diff --git a/kordophoned/src/xpc/rpc.rs b/kordophoned/src/xpc/rpc.rs index 9d199a1..6bfa2a5 100644 --- a/kordophoned/src/xpc/rpc.rs +++ b/kordophoned/src/xpc/rpc.rs @@ -155,6 +155,15 @@ pub async fn dispatch( 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_str(&mut m, "sender", &msg.sender.display_name()); + + // Include attachment GUIDs for the client to resolve/download + let attachment_guids: Vec = msg + .attachments + .iter() + .map(|a| a.guid.clone()) + .collect(); + m.insert(cstr("attachment_guids"), array_from_strs(attachment_guids)); + items.push(Message::Dictionary(m)); } let mut reply: XpcMap = HashMap::new();