Skip to content

Commit

Permalink
Add the sender when showing a policy rule change. (#51)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gnuxie committed May 10, 2023
1 parent 9f43e11 commit 88bf0ac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ProtectedRoomsSet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down

0 comments on commit 88bf0ac

Please sign in to comment.