fix: ignore blocked users when adding mentions

closes #145
This commit is contained in:
Paul Makles
2022-04-21 16:50:47 +01:00
parent da08a7d722
commit 535665ca1b

View File

@@ -116,9 +116,12 @@ pub async fn message_send(
} }
if !mentions.is_empty() { if !mentions.is_empty() {
message message.mentions.replace(
.mentions mentions
.replace(mentions.into_iter().collect::<Vec<String>>()); .into_iter()
.filter(|id| !user.has_blocked(id))
.collect::<Vec<String>>(),
);
} }
if !replies.is_empty() { if !replies.is_empty() {