Add attachments for messages from Discord on receipt
parent
77fd8b1ecb
commit
f2900d834e
|
@ -69,11 +69,18 @@ impl EventHandler for DiscordHandler {
|
||||||
.as_ref()
|
.as_ref()
|
||||||
.map(|m| ChatMessageReference::new(discord_reference(m.channel_id), m.id));
|
.map(|m| ChatMessageReference::new(discord_reference(m.channel_id), m.id));
|
||||||
|
|
||||||
|
let attachments = message
|
||||||
|
.attachments
|
||||||
|
.into_iter()
|
||||||
|
.map(|a| a.url)
|
||||||
|
.map(ChatAttachment::URL)
|
||||||
|
.collect::<Vec<_>>();
|
||||||
|
|
||||||
let chat_message = ChatMessage {
|
let chat_message = ChatMessage {
|
||||||
origin,
|
origin,
|
||||||
author,
|
author,
|
||||||
content,
|
content,
|
||||||
attachments: vec![],
|
attachments,
|
||||||
replying: replies_to,
|
replying: replies_to,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue