Allow reactions for broadcasts (#9856)
This commit is contained in:
parent
720bf0573a
commit
488a08a25e
7 changed files with 57 additions and 7 deletions
|
@ -32,6 +32,7 @@ import { TimelineRenderingType } from "../contexts/RoomContext";
|
|||
import { launchPollEditor } from "../components/views/messages/MPollBody";
|
||||
import { Action } from "../dispatcher/actions";
|
||||
import { ViewRoomPayload } from "../dispatcher/payloads/ViewRoomPayload";
|
||||
import { VoiceBroadcastInfoEventType, VoiceBroadcastInfoState } from "../voice-broadcast/types";
|
||||
|
||||
/**
|
||||
* Returns whether an event should allow actions like reply, reactions, edit, etc.
|
||||
|
@ -56,7 +57,9 @@ export function isContentActionable(mxEvent: MatrixEvent): boolean {
|
|||
} else if (
|
||||
mxEvent.getType() === "m.sticker" ||
|
||||
M_POLL_START.matches(mxEvent.getType()) ||
|
||||
M_BEACON_INFO.matches(mxEvent.getType())
|
||||
M_BEACON_INFO.matches(mxEvent.getType()) ||
|
||||
(mxEvent.getType() === VoiceBroadcastInfoEventType &&
|
||||
mxEvent.getContent()?.state === VoiceBroadcastInfoState.Started)
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue