mirror of
https://github.com/matrix-org/mjolnir.git
synced 2024-10-01 01:36:06 -04:00
Add list shortcodes to status command output (#312)
This commit is contained in:
parent
4d5447cb50
commit
89b7ec1a18
@ -75,8 +75,8 @@ async function showMjolnirStatus(roomId: string, event: any, mjolnir: Mjolnir) {
|
|||||||
text += "Subscribed ban lists:\n";
|
text += "Subscribed ban lists:\n";
|
||||||
for (const list of mjolnir.lists) {
|
for (const list of mjolnir.lists) {
|
||||||
const ruleInfo = `rules: ${list.serverRules.length} servers, ${list.userRules.length} users, ${list.roomRules.length} rooms`;
|
const ruleInfo = `rules: ${list.serverRules.length} servers, ${list.userRules.length} users, ${list.roomRules.length} rooms`;
|
||||||
html += `<li><a href="${list.roomRef}">${list.roomId}</a> (${ruleInfo})</li>`;
|
html += `<li>${htmlEscape(list.listShortcode)} @ <a href="${list.roomRef}">${list.roomId}</a> (${ruleInfo})</li>`;
|
||||||
text += `* ${list.roomRef} (${ruleInfo})\n`;
|
text += `* ${list.listShortcode} @ ${list.roomRef} (${ruleInfo})\n`;
|
||||||
}
|
}
|
||||||
if (mjolnir.lists.length === 0) {
|
if (mjolnir.lists.length === 0) {
|
||||||
html += "<li><i>None</i></li>";
|
html += "<li><i>None</i></li>";
|
||||||
|
Loading…
Reference in New Issue
Block a user