From 24ccf5eeff794cfc794dc12d2c66e57d04457368 Mon Sep 17 00:00:00 2001 From: td Date: Fri, 12 Apr 2024 15:53:13 +0530 Subject: [PATCH] fix: remove msc3245 key from audio events looks like we do not support this anyway and this confuses bridges, basically removes all voice message related things from the sdk --- .../extension_audio_events/audio_events.dart | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/lib/msc_extensions/extension_audio_events/audio_events.dart b/lib/msc_extensions/extension_audio_events/audio_events.dart index 3d1a735f..f93ef5ec 100644 --- a/lib/msc_extensions/extension_audio_events/audio_events.dart +++ b/lib/msc_extensions/extension_audio_events/audio_events.dart @@ -1,19 +1,11 @@ import 'package:matrix/matrix.dart'; -extension AudioEventExtension on Event { - /// returns if the event is a voice message - bool get isVoiceMessage => - content['org.matrix.msc2516.voice'] is Map || - content['org.matrix.msc3245.voice'] is Map; -} - extension AudioEventRoomExtension on Room { /// Sends an audio file with appropriate info to this room. Returns the event /// ID generated by the server for this event. Future sendAudioEvent( MatrixAudioFile audioFile, { Event? replyTo, - bool isVoiceMessage = false, int? durationInMs, List? waveform, Map? otherFileInfo, @@ -24,10 +16,6 @@ extension AudioEventRoomExtension on Room { otherFileInfo['duration'] = durationInMs; } if (otherFileInfo != null) extraContent['info'] = otherFileInfo; - if (isVoiceMessage) { - // No content, this is only used to identify if the event is a voice message. - extraContent['org.matrix.msc3245.voice'] = {}; - } extraContent['org.matrix.msc1767.audio'] = { 'duration': durationInMs, 'waveform': waveform,