Separate attachments in reply with a space

This commit is contained in:
Yash Karandikar 2022-07-16 07:45:18 -04:00
parent 4e10398d62
commit 121f3da671

View file

@ -155,15 +155,8 @@ impl EventHandler for Handler {
let mut content = reply.content;
content = content.replace("\r\n", " "); // just in case
content = content.replace('\n', " ");
content = format!(
"{} {}",
content,
reply
.attachments
.iter()
.map(|a| &*a.url)
.collect::<String>()
);
let atts: Vec<&str> = reply.attachments.iter().map(|a| &*a.url).collect();
content = format!("{} {}", content, atts.join(" "));
content = discord_to_irc_processing(&content, &**members_lock, &ctx, &roles).await;