Add the sender when showing a policy rule change. (#51)

![image](https://github.com/Gnuxie/Draupnir/assets/50846879/1e445d60-d816-4bd1-bec2-c6b4128793d7)

Mainly useful for Community Moderation Effort.
This commit is contained in:
Gnuxie
2023-05-10 23:07:32 +01:00
committed by GitHub
parent 9f43e1186b
commit 88bf0acf5e
+2 -2
View File
@@ -454,8 +454,8 @@ export class ProtectedRoomsSet {
} else if (ruleKind === RULE_ROOM) {
ruleKind = 'room';
}
html += `<li>${change.changeType} ${htmlEscape(ruleKind)} (<code>${htmlEscape(rule.recommendation ?? "")}</code>): <code>${htmlEscape(rule.entity)}</code> (${htmlEscape(rule.reason)})</li>`;
text += `* ${change.changeType} ${ruleKind} (${rule.recommendation}): ${rule.entity} (${rule.reason})\n`;
html += `<li><a href="https://matrix.to/#/${htmlEscape(change.sender)}">${htmlEscape(change.sender)}</a> ${change.changeType} ${htmlEscape(ruleKind)} (<code>${htmlEscape(rule.recommendation ?? "")}</code>): <code>${htmlEscape(rule.entity)}</code> (${htmlEscape(rule.reason)})</li>`;
text += `* ${change.sender} ${change.changeType} ${ruleKind} (${rule.recommendation}): ${rule.entity} (${rule.reason})\n`;
}
const message = {