mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-06 16:54:10 -04:00
Extend spam checker to allow for multiple modules (#7435)
This commit is contained in:
parent
616af44137
commit
67feea8044
6 changed files with 94 additions and 59 deletions
|
@ -185,7 +185,7 @@ class UserDirectoryTestCase(unittest.HomeserverTestCase):
|
|||
# Allow all users.
|
||||
return False
|
||||
|
||||
spam_checker.spam_checker = AllowAll()
|
||||
spam_checker.spam_checkers = [AllowAll()]
|
||||
|
||||
# The results do not change:
|
||||
# We get one search result when searching for user2 by user1.
|
||||
|
@ -198,7 +198,7 @@ class UserDirectoryTestCase(unittest.HomeserverTestCase):
|
|||
# All users are spammy.
|
||||
return True
|
||||
|
||||
spam_checker.spam_checker = BlockAll()
|
||||
spam_checker.spam_checkers = [BlockAll()]
|
||||
|
||||
# User1 now gets no search results for any of the other users.
|
||||
s = self.get_success(self.handler.search_users(u1, "user2", 10))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue