This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Rename various ApplicationServices interested methods #11915
Merged
Merged
Commits on Mar 3, 2022
-
Rename various ApplicationServices interested methods
...to better reflect what they actually do. * ApplicationServices.is_interested -> is_interested_in_event * ApplicationService.is_interested_in_user -> is_user_in_namespace * ApplicationService.is_interested_in_alias -> is_room_alias_in_namespace * ApplicationService.is_interested_in_room_id -> is_room_id_in_namespace This leaves us with only an is_interested_in_event method. Next commit we'll fill in the gaps for checking interest of rooms and users.
Configuration menu - View commit details
-
Copy full SHA for aaa402e - Browse repository at this point
Copy the full SHA aaa402eView commit details -
Add 'is_interested_in_user' and 'is_interested_in_room'
...that make use of the simpler helper methods we just renamed. This commit adds the equivalent methods of is_interested_in_event for both users and rooms. These implementations include more comprehensive checks then the older methods with the same names.
Configuration menu - View commit details
-
Copy full SHA for fe17863 - Browse repository at this point
Copy the full SHA fe17863View commit details -
Configuration menu - View commit details
-
Copy full SHA for a493a16 - Browse repository at this point
Copy the full SHA a493a16View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4866227 - Browse repository at this point
Copy the full SHA 4866227View commit details -
Configuration menu - View commit details
-
Copy full SHA for bcae63e - Browse repository at this point
Copy the full SHA bcae63eView commit details -
Add caching to ApplicationService.is_interested_in_event
Which will be invalidated when RoomMemberWorkerStore.get_users_in_room is. is_interested_in_room already has caching, and is_interested_in_user does not arguably need it (as the check is so cheap and regex comparisons are cached anyways).
Configuration menu - View commit details
-
Copy full SHA for 381b560 - Browse repository at this point
Copy the full SHA 381b560View commit details -
Make matches_user_in_member_list method private; update refs
References to this method wanted to check if an AS should receive events from a room. They were only checking to see if the AS had a user in the room, whereas the AS should also see those events if it has registered the room's ID or one of its aliases in the AS' relevant namespace.
Configuration menu - View commit details
-
Copy full SHA for bf00539 - Browse repository at this point
Copy the full SHA bf00539View commit details -
Configuration menu - View commit details
-
Copy full SHA for 27ffd6d - Browse repository at this point
Copy the full SHA 27ffd6dView commit details -
Type hints and docstring for _mkservice, _mkservice_alias
This commit also returns _mkservice to only modifying whether an AS is interested in an event (and shifts other interest modifications back to specific test methods). Modifying _mkservice to enable further interest wasn't necessary for these tests to pass.
Configuration menu - View commit details
-
Copy full SHA for eb779e0 - Browse repository at this point
Copy the full SHA eb779e0View commit details -
Add an event ID arg to is_interested_in_event to cache with
Caching using an EventBase is not quite sufficient while we have no defined way of checking whether two instances are equal other than if they are the equivalent object. Instead, we use the event ID here for now, which should be good enough in this case.
Configuration menu - View commit details
-
Copy full SHA for 453fdac - Browse repository at this point
Copy the full SHA 453fdacView commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.