mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-10-01 11:49:51 -04:00
Remove store_id from notifier.on_new_room_event calls.
This commit is contained in:
parent
89c044c2a0
commit
8af5e360d6
@ -110,7 +110,7 @@ class FederationHandler(BaseHandler):
|
|||||||
)
|
)
|
||||||
|
|
||||||
if not backfilled:
|
if not backfilled:
|
||||||
yield self.notifier.on_new_room_event(event, store_id)
|
yield self.notifier.on_new_room_event(event)
|
||||||
|
|
||||||
if event.type == RoomMemberEvent.TYPE:
|
if event.type == RoomMemberEvent.TYPE:
|
||||||
if event.membership == Membership.JOIN:
|
if event.membership == Membership.JOIN:
|
||||||
|
@ -94,7 +94,7 @@ class MessageHandler(BaseHandler):
|
|||||||
event.room_id
|
event.room_id
|
||||||
)
|
)
|
||||||
|
|
||||||
self.notifier.on_new_room_event(event, store_id)
|
self.notifier.on_new_room_event(event)
|
||||||
|
|
||||||
yield self.hs.get_federation().handle_new_event(event)
|
yield self.hs.get_federation().handle_new_event(event)
|
||||||
|
|
||||||
@ -158,7 +158,7 @@ class MessageHandler(BaseHandler):
|
|||||||
event.destinations = yield self.store.get_joined_hosts_for_room(
|
event.destinations = yield self.store.get_joined_hosts_for_room(
|
||||||
event.room_id
|
event.room_id
|
||||||
)
|
)
|
||||||
self.notifier.on_new_room_event(event, store_id)
|
self.notifier.on_new_room_event(event)
|
||||||
|
|
||||||
yield self.hs.get_federation().handle_new_event(event)
|
yield self.hs.get_federation().handle_new_event(event)
|
||||||
|
|
||||||
@ -240,7 +240,7 @@ class MessageHandler(BaseHandler):
|
|||||||
)
|
)
|
||||||
yield self.hs.get_federation().handle_new_event(event)
|
yield self.hs.get_federation().handle_new_event(event)
|
||||||
|
|
||||||
self.notifier.on_new_room_event(event, store_id)
|
self.notifier.on_new_room_event(event)
|
||||||
|
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
def snapshot_all_rooms(self, user_id=None, pagin_config=None,
|
def snapshot_all_rooms(self, user_id=None, pagin_config=None,
|
||||||
@ -405,10 +405,8 @@ class RoomCreationHandler(BaseHandler):
|
|||||||
)
|
)
|
||||||
|
|
||||||
yield self.state_handler.handle_new_event(config_event)
|
yield self.state_handler.handle_new_event(config_event)
|
||||||
# store_id = persist...
|
|
||||||
|
|
||||||
yield self.hs.get_federation().handle_new_event(config_event)
|
yield self.hs.get_federation().handle_new_event(config_event)
|
||||||
# self.notifier.on_new_room_event(event, store_id)
|
|
||||||
|
|
||||||
content = {"membership": Membership.JOIN}
|
content = {"membership": Membership.JOIN}
|
||||||
join_event = self.event_factory.create_event(
|
join_event = self.event_factory.create_event(
|
||||||
@ -726,23 +724,20 @@ class RoomMemberHandler(BaseHandler):
|
|||||||
# If we're inviting someone, then we should also send it to that
|
# If we're inviting someone, then we should also send it to that
|
||||||
# HS.
|
# HS.
|
||||||
target_user_id = event.state_key
|
target_user_id = event.state_key
|
||||||
|
target_user = self.hs.parse_userid(target_user_id)
|
||||||
if membership == Membership.INVITE:
|
if membership == Membership.INVITE:
|
||||||
host = UserID.from_string(
|
host = target_user.domain
|
||||||
target_user_id, self.hs
|
|
||||||
).domain
|
|
||||||
destinations.append(host)
|
destinations.append(host)
|
||||||
|
|
||||||
# If we are joining a remote HS, include that.
|
# If we are joining a remote HS, include that.
|
||||||
if membership == Membership.JOIN:
|
if membership == Membership.JOIN:
|
||||||
host = UserID.from_string(
|
host = target_user.domain
|
||||||
target_user_id, self.hs
|
|
||||||
).domain
|
|
||||||
destinations.append(host)
|
destinations.append(host)
|
||||||
|
|
||||||
event.destinations = list(set(destinations))
|
event.destinations = list(set(destinations))
|
||||||
|
|
||||||
yield self.hs.get_federation().handle_new_event(event)
|
yield self.hs.get_federation().handle_new_event(event)
|
||||||
self.notifier.on_new_room_event(event, store_id)
|
self.notifier.on_new_room_event(event, extra_users=[target_user])
|
||||||
|
|
||||||
|
|
||||||
class RoomListHandler(BaseHandler):
|
class RoomListHandler(BaseHandler):
|
||||||
|
Loading…
Reference in New Issue
Block a user