Skip to content

Commit 45dd280

Browse files
committed
policyeval/antispam: remove mentions in rejected invites notice
1 parent 78716e8 commit 45dd280

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

policyeval/antispam.go

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -232,13 +232,18 @@ func (pe *PolicyEvaluator) RejectPendingInvites(ctx context.Context, inviter id.
232232
successfullyRejected++
233233
}
234234
}
235-
pe.sendNotice(
235+
pe.Bot.SendNoticeOpts(
236236
ctx,
237-
"Rejected %d/%d invites to [%s](%s) from ||[%s](%s)|| due to policy banning ||`%s`|| for `%s`",
238-
successfullyRejected, len(rooms),
239-
userID, userID.URI().MatrixToURL(),
240-
inviter, inviter.URI().MatrixToURL(),
241-
rec.EntityOrHash(), rec.Reason,
237+
pe.ManagementRoom,
238+
fmt.Sprintf(
239+
"Rejected %d/%d invites to [%s](%s) from ||[%s](%s)|| due to policy banning ||`%s`|| for `%s`",
240+
successfullyRejected, len(rooms),
241+
userID, userID.URI().MatrixToURL(),
242+
inviter, inviter.URI().MatrixToURL(),
243+
rec.EntityOrHash(), rec.Reason,
244+
),
245+
// Don't mention users
246+
&bot.SendNoticeOpts{Mentions: &event.Mentions{}},
242247
)
243248
}
244249
}

0 commit comments

Comments
 (0)