mirror of
https://github.com/the-draupnir-project/Draupnir.git
synced 2026-10-22 17:11:17 +00:00
Add an API to filter user directory searches by MXID or display name.
This commit is contained in:
1 parent
5d8fea07fc
commit
95bb5a7e83
2 files changed
+8
No files matched your search
@@ -69,3 +69,6 @@ typings/
|
||||
|
||||
# next.js build output
|
||||
.next
|
||||
|
||||
# Python packing directories.
|
||||
mjolnir.egg-info/
|
||||
@@ -115,6 +115,11 @@ class AntiSpam(object):
|
||||
def user_may_publish_room(self, user_id, room_id):
|
||||
return True # allowed
|
||||
|
||||
def check_for_banned_user(self, user_id, display_name):
|
||||
# Check whether the user ID or display name matches any of the banned
|
||||
# patterns.
|
||||
return self.is_user_banned(user_id) or self.is_user_banned(display_name)
|
||||
|
||||
@staticmethod
|
||||
def parse_config(config):
|
||||
return config # no parsing needed
|
||||
Reference in new issue
Block a user