Ensures that we only support reactions for a start event

This commit is contained in:
Nicolas Mauri
2023-01-09 14:46:26 +01:00
parent 9a792f6053
commit 9845d161a5
@@ -2886,8 +2886,14 @@ typedef NS_ENUM (NSUInteger, MXKRoomDataSourceError) {
}
// Specific case for voice broadcast event
if (event.eventType == MXEventTypeCustom && [event.type isEqualToString:VoiceBroadcastSettings.voiceBroadcastInfoContentKeyType]) {
return YES;
if (event.eventType == MXEventTypeCustom &&
[event.type isEqualToString:VoiceBroadcastSettings.voiceBroadcastInfoContentKeyType]) {
// Ensures that we only support reactions for a start event
VoiceBroadcastInfo* voiceBroadcastInfo = [VoiceBroadcastInfo modelFromJSON: event.content];
if ([VoiceBroadcastInfo isStartedFor: voiceBroadcastInfo.state]) {
return YES;
}
}
BOOL isRoomMessage = (event.eventType == MXEventTypeRoomMessage);