matrix-moderation-widget

A widget for moderating with mjolnir. Highly WIP. Use at your own risk!
git clone git://archive.git.mtrnord.blog/MTRNord/matrix-moderation-widget.git
Log | Files | Refs | README | LICENSE

commit 213495db07f0a894ee0720374aa9aa827ddc20d3
parent 533d77e774a3e7aca5cc853223b7b651ad92d795
Author: MTRNord <mtrnord1@gmail.com>
Date:   Thu,  3 Mar 2022 17:18:19 +0100

Also show lists a user isnt joined in for the banform

Diffstat:
Msrc/components/forms/BanForm.tsx | 8++++++++
1 file changed, 8 insertions(+), 0 deletions(-)

diff --git a/src/components/forms/BanForm.tsx b/src/components/forms/BanForm.tsx @@ -72,6 +72,14 @@ class BanForm extends PureComponent<Props, State> { } } + if (banlist_codes.length > 0) { + const lists_event = banlist_codes.find(list => list.room_id === this.state.roomId); + for (const list of lists_event?.content?.banlists?.keys ?? []) { + if (!aliases_shortcodes.has(list)) { + aliases_shortcodes.set(list, lists_event?.content?.banlists[list]); + } + } + } this.setState({ aliases_shortcodes });