diff options
author | Erik Johnston <erik@matrix.org> | 2016-08-17 15:35:07 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2016-08-17 15:35:07 +0100 |
commit | eb17724cea2daf6c3db607e36d09c03af2351183 (patch) | |
tree | de6abd0c270e6f62c7020f52d964cddff3d2e819 /synapse | |
parent | Add None check to _iterate_over_text (diff) | |
download | synapse-eb17724cea2daf6c3db607e36d09c03af2351183.tar.xz |
Change get_users_in_room to using current state
Diffstat (limited to 'synapse')
-rw-r--r-- | synapse/handlers/appservice.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/synapse/handlers/appservice.py b/synapse/handlers/appservice.py index 48feae07b5..59f19ab3b6 100644 --- a/synapse/handlers/appservice.py +++ b/synapse/handlers/appservice.py @@ -15,7 +15,7 @@ from twisted.internet import defer -from synapse.api.constants import EventTypes +from synapse.api.constants import EventTypes, Membership from synapse.appservice import ApplicationService from synapse.util.metrics import Measure @@ -146,7 +146,11 @@ class ApplicationServicesHandler(object): ) # We need to know the members associated with this event.room_id, # if any. - member_list = yield self.store.get_users_in_room(event.room_id) + state = yield self.store.get_state_for_event(event.event_id) + member_list = [ + e.state_key for e in state.values() + if e.type == EventTypes.Member and e.membership == Membership.JOIN + ] services = yield self.store.get_app_services() interested_list = [ |