Support reactions on Voice Broadcast

This commit is contained in:
yostyle 2023-01-19 11:27:52 +01:00
parent 0cdbceaa00
commit e4d0394234
2 changed files with 3 additions and 1 deletions

1
changelog.d/7807.misc Normal file
View File

@ -0,0 +1 @@
Support reactions on Voice Broadcast

View File

@ -27,7 +27,8 @@ import org.matrix.android.sdk.api.session.room.timeline.getLastMessageContent
fun TimelineEvent.canReact(): Boolean {
// Only event of type EventType.MESSAGE, EventType.STICKER and EventType.POLL_START are supported for the moment
return root.getClearType() in listOf(EventType.MESSAGE, EventType.STICKER) + EventType.POLL_START.values + EventType.POLL_END.values &&
return root.getClearType() in listOf(EventType.MESSAGE, EventType.STICKER, VoiceBroadcastConstants.STATE_ROOM_VOICE_BROADCAST_INFO) +
EventType.POLL_START.values + EventType.POLL_END.values &&
root.sendState == SendState.SYNCED &&
!root.isRedacted()
}