Always try to delete a voicebroadcast with relations. The SDK will ensure the feature is supported.

This commit is contained in:
Nicolas Mauri
2023-01-23 17:06:47 +01:00
parent 54c5ec8aca
commit 3bd2cc1bbd
+2 -5
View File
@@ -4303,12 +4303,9 @@ static CGSize kThreadListBarButtonItemImageSize;
[self startActivityIndicator];
NSArray<NSString *>* relationTypes = nil;
// If it's a voice broadcast, delete the selected event and all related events (only if this feature is supported).
// If it's a voice broadcast, delete the selected event and all related events.
if (selectedEvent.eventType == MXEventTypeCustom && [selectedEvent.type isEqualToString:VoiceBroadcastSettings.voiceBroadcastInfoContentKeyType]) {
// Check if the homeserver supports redaction with relations
if (self.mainSession.store.supportedMatrixVersions.supportsRedactionWithRelations || self.mainSession.store.supportedMatrixVersions.supportsRedactionWithRelationsUnstable) {
relationTypes = @[MXEventRelationTypeReference];
}
relationTypes = @[MXEventRelationTypeReference];
}
MXWeakify(self);