Skip to content

Commit

Permalink
Don't pull full room state on init
Browse files Browse the repository at this point in the history
  • Loading branch information
hifi committed Dec 20, 2021
1 parent 9a43ca1 commit bab7dd0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions heisenbridge/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -503,8 +503,8 @@ async def run(self, listen_address, listen_port, homeserver_url, owner, safe_mod
if not cls:
raise Exception("Unknown room type")

# refresh state store
await self.az.intent.get_state(room_id)
# refresh room members state
await self.az.intent.get_room_members(room_id)

joined = await self.az.state_store.get_member_profiles(room_id, (Membership.JOIN,))
banned = await self.az.state_store.get_members(room_id, (Membership.BAN,))
Expand Down
4 changes: 2 additions & 2 deletions heisenbridge/plumbed_room.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ async def create(network: "NetworkRoom", id: str, channel: str, key: str) -> "Ch
network.send_notice(f"Failed to join room: {str(e)}")
return

network.send_notice(f"Joined room {room_id}, refreshing state...")
await network.az.intent.get_state(room_id)
network.send_notice(f"Joined room {room_id}, refreshing member state...")
await network.az.intent.get_room_members(room_id)
network.send_notice(f"Got state for room {room_id}, plumbing...")

joined = await network.az.state_store.get_member_profiles(room_id, (Membership.JOIN,))
Expand Down

0 comments on commit bab7dd0

Please sign in to comment.