Merge pull request #734 from pangeachat/hide-transcription-error-in-timeline

if send transcription file fails, don't show error audio message in t…
This commit is contained in:
ggurdin 2024-10-11 15:38:55 -04:00 committed by GitHub
commit c72d2480b4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -21,6 +21,11 @@ extension IsStateExtension on Event {
(isState || !AppConfig.hideAllStateEvents) &&
// #Pangea
content.tryGet(ModelKey.transcription) == null &&
// if sending of transcription fails,
// don't show it as a errored audio event in timeline.
((unsigned?['extra_content']
as Map<String, dynamic>?)?[ModelKey.transcription] ==
null) &&
// hide unimportant state events
(!AppConfig.hideUnimportantStateEvents ||
!isState ||