Skip to content

Commit

Permalink
Make use of the newly exposed room_type in _build_room_entry
Browse files Browse the repository at this point in the history
  • Loading branch information
anoadragon453 committed Jul 12, 2022
1 parent 2162421 commit 7dd8b26
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions synapse/handlers/room_summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import attr

from synapse.api.constants import (
EventContentFields,
EventTypes,
HistoryVisibility,
JoinRules,
Expand Down Expand Up @@ -706,9 +705,6 @@ async def _build_room_entry(self, room_id: str, for_federation: bool) -> JsonDic
current_state_ids = await self._storage_controllers.state.get_current_state_ids(
room_id
)
create_event = await self._store.get_event(
current_state_ids[(EventTypes.Create, "")]
)

entry = {
"room_id": stats["room_id"],
Expand All @@ -722,7 +718,7 @@ async def _build_room_entry(self, room_id: str, for_federation: bool) -> JsonDic
stats["history_visibility"] == HistoryVisibility.WORLD_READABLE
),
"guest_can_join": stats["guest_access"] == "can_join",
"room_type": create_event.content.get(EventContentFields.ROOM_TYPE),
"room_type": stats["room_type"],
}

if self._msc3266_enabled:
Expand Down

0 comments on commit 7dd8b26

Please sign in to comment.