mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-07 11:42:11 -04:00
Fix a long-standing bug where the user directory would return 1 more row than requested. (#14631)
This commit is contained in:
parent
9e82caac45
commit
cf1059d045
4 changed files with 10 additions and 3 deletions
|
@ -448,6 +448,12 @@ class UserDirectoryStoreTestCase(HomeserverTestCase):
|
|||
{"user_id": BOBBY, "display_name": "bobby", "avatar_url": None},
|
||||
)
|
||||
|
||||
@override_config({"user_directory": {"search_all_users": True}})
|
||||
def test_search_user_limit_correct(self) -> None:
|
||||
r = self.get_success(self.store.search_user_dir(ALICE, "bob", 1))
|
||||
self.assertTrue(r["limited"])
|
||||
self.assertEqual(1, len(r["results"]))
|
||||
|
||||
@override_config({"user_directory": {"search_all_users": True}})
|
||||
def test_search_user_dir_stop_words(self) -> None:
|
||||
"""Tests that a user can look up another user by searching for the start if its
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue