Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Don't show polls in timeline if polls are disabled (#7332)
Browse files Browse the repository at this point in the history
  • Loading branch information
andybalaam authored Dec 10, 2021
1 parent 5554d7f commit c21895b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/components/views/rooms/EventTile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,13 @@ export function getHandlerTile(ev) {
}
}

if (
POLL_START_EVENT_TYPE.matches(type) &&
!SettingsStore.getValue("feature_polls")
) {
return undefined;
}

if (ev.isState()) {
if (stateEventSingular.has(type) && ev.getStateKey() !== "") return undefined;
return stateEventTileTypes[type];
Expand Down

0 comments on commit c21895b

Please sign in to comment.