From 34ff4d642d9ccba642a95c178f40d507af4f8f6f Mon Sep 17 00:00:00 2001 From: "benoit.martins" Date: Thu, 19 Oct 2023 16:28:31 +0200 Subject: [PATCH] Fix displayName is nil for event message --- Classes/Swift/Chat/Views/MultilineMessageCell.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Classes/Swift/Chat/Views/MultilineMessageCell.swift b/Classes/Swift/Chat/Views/MultilineMessageCell.swift index 30d96782a..5b5d668c4 100644 --- a/Classes/Swift/Chat/Views/MultilineMessageCell.swift +++ b/Classes/Swift/Chat/Views/MultilineMessageCell.swift @@ -2026,16 +2026,16 @@ class MultilineMessageCell: SwipeCollectionViewCell, UICollectionViewDataSource, subject = event.subject! return VoipTexts.bubble_chat_event_message_new_subject + subject case Int(LinphoneEventLogTypeConferenceParticipantAdded.rawValue): - participant = (event.participantAddress!.displayName != "" ? event.participantAddress!.displayName : event.participantAddress!.username)! + participant = (event.participantAddress!.displayName != "" && event.participantAddress!.displayName != nil ? event.participantAddress!.displayName : event.participantAddress!.username)! return participant + VoipTexts.bubble_chat_event_message_has_joined case Int(LinphoneEventLogTypeConferenceParticipantRemoved.rawValue): - participant = (event.participantAddress!.displayName != "" ? event.participantAddress!.displayName : event.participantAddress!.username)! + participant = (event.participantAddress!.displayName != "" && event.participantAddress!.displayName != nil ? event.participantAddress!.displayName : event.participantAddress!.username)! return participant + VoipTexts.bubble_chat_event_message_has_left case Int(LinphoneEventLogTypeConferenceParticipantSetAdmin.rawValue): - participant = (event.participantAddress!.displayName != "" ? event.participantAddress!.displayName : event.participantAddress!.username)! + participant = (event.participantAddress!.displayName != "" && event.participantAddress!.displayName != nil ? event.participantAddress!.displayName : event.participantAddress!.username)! return participant + VoipTexts.bubble_chat_event_message_now_admin case Int(LinphoneEventLogTypeConferenceParticipantUnsetAdmin.rawValue): - participant = (event.participantAddress!.displayName != "" ? event.participantAddress!.displayName : event.participantAddress!.username)! + participant = (event.participantAddress!.displayName != "" && event.participantAddress!.displayName != nil ? event.participantAddress!.displayName : event.participantAddress!.username)! return participant + VoipTexts.bubble_chat_event_message_no_longer_admin case Int(LinphoneEventLogTypeConferenceTerminated.rawValue): return VoipTexts.bubble_chat_event_message_left_group