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 b8923460df
commit 15c68bfe3d
@@ -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);