You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pe.sendNotice(ctx, "Suspended [%s](%s) due to received ban policy", userID, userID.URI().MatrixToURL())
148
+
pe.sendNotice(ctx, "Suspended %s due to received ban policy", format.MarkdownMention(userID))
149
149
}
150
150
}
151
151
@@ -180,16 +180,16 @@ func (pe *PolicyEvaluator) ApplyBan(
180
180
err=respErr
181
181
}
182
182
zerolog.Ctx(ctx).Err(err).Any("attempted_action", ta).Msg("Failed to ban user")
183
-
pe.sendNotice(ctx, "Failed to ban ||[%s](%s)|| in [%s](%s) for %s: %v", userID, userID.URI().MatrixToURL(), roomID, roomID.URI().MatrixToURL(), policy.Reason, err)
183
+
pe.sendNotice(ctx, "Failed to ban ||%s|| in %s for %s: %v", format.MarkdownMention(userID), format.MarkdownMentionRoomID("", roomID), policy.Reason, err)
184
184
return
185
185
}
186
186
err=pe.DB.TakenAction.Put(ctx, ta)
187
187
iferr!=nil {
188
188
zerolog.Ctx(ctx).Err(err).Any("taken_action", ta).Msg("Failed to save taken action")
189
-
pe.sendNotice(ctx, "Banned ||[%s](%s)|| in [%s](%s) for %s, but failed to save to database: %v", userID, userID.URI().MatrixToURL(), roomID, roomID.URI().MatrixToURL(), policy.Reason, err)
189
+
pe.sendNotice(ctx, "Banned ||%s|| in %s for %s, but failed to save to database: %v", format.MarkdownMention(userID), format.MarkdownMentionRoomID("", roomID), policy.Reason, err)
0 commit comments