diff --git a/Classes/MagicSearch.swift b/Classes/MagicSearch.swift index 994e99b02..2dac0586c 100644 --- a/Classes/MagicSearch.swift +++ b/Classes/MagicSearch.swift @@ -83,10 +83,11 @@ import linphonesw if let addr = searchResult.address, let foundContact = getContactFromAddr(addr: addr) { return foundContact } + if searchResult.phoneNumber != nil { if let foundContact = getContactFromPhoneNb(phoneNb: searchResult.phoneNumber!) { - return foundContact - } + return foundContact + } } // Friend comes from provisioning diff --git a/Classes/Swift/Chat/Views/ChatConversationTableViewSwift.swift b/Classes/Swift/Chat/Views/ChatConversationTableViewSwift.swift index 310fdadbe..30c802389 100644 --- a/Classes/Swift/Chat/Views/ChatConversationTableViewSwift.swift +++ b/Classes/Swift/Chat/Views/ChatConversationTableViewSwift.swift @@ -625,7 +625,8 @@ class ChatConversationTableViewSwift: UIViewController, UICollectionViewDataSour } viewer.imageViewer = image - viewer.imageNameViewer = chatMessage.contents.first!.name!.isEmpty ? "" : chatMessage.contents.first!.name! + viewer.imageNameViewer = (chatMessage.contents.first!.name!.isEmpty ? "" : chatMessage.contents.first!.name)! + viewer.imagePathViewer = chatMessage.contents.first!.exportPlainFile() viewer.contentType = chatMessage.contents.first!.type PhoneMainView.instance().changeCurrentView(viewer.compositeViewDescription()) @@ -701,7 +702,7 @@ class ChatConversationTableViewSwift: UIViewController, UICollectionViewDataSour } viewer.imageViewer = image - viewer.imageNameViewer = chatMessage!.contents[index].name!.isEmpty ? "" : chatMessage!.contents[index].name! + viewer.imageNameViewer = (chatMessage!.contents[index].name!.isEmpty ? "" : chatMessage!.contents[index].name)! viewer.imagePathViewer = chatMessage!.contents[index].exportPlainFile() viewer.contentType = chatMessage!.contents[index].type PhoneMainView.instance().changeCurrentView(viewer.compositeViewDescription()) diff --git a/Resources/fr.lproj/Localizable.strings b/Resources/fr.lproj/Localizable.strings index fbe95b076..25ff586b0 100644 Binary files a/Resources/fr.lproj/Localizable.strings and b/Resources/fr.lproj/Localizable.strings differ diff --git a/msgNotificationService/NotificationService.swift b/msgNotificationService/NotificationService.swift index dbcf4efe1..0cda96771 100644 --- a/msgNotificationService/NotificationService.swift +++ b/msgNotificationService/NotificationService.swift @@ -133,8 +133,13 @@ class NotificationService: UNNotificationServiceExtension { bestAttemptContent.userInfo.updateValue(msgData?.from as Any, forKey: "from") bestAttemptContent.userInfo.updateValue(msgData?.peerAddr as Any, forKey: "peer_addr") bestAttemptContent.userInfo.updateValue(msgData?.localAddr as Any, forKey: "local_addr") - - contentHandler(bestAttemptContent) + + if message.reactionContent != " " { + contentHandler(bestAttemptContent) + }else { + contentHandler(UNNotificationContent()) + } + return } else { NotificationService.log.message(message: "Message not found for callid ["+callId+"]") @@ -183,6 +188,7 @@ class NotificationService: UNNotificationServiceExtension { let callId = message.callId let localUri = message.localAddr?.asStringUriOnly() let peerUri = message.peerAddr?.asStringUriOnly() + let reactionContent = message.reactionContent let from: String if let fromDisplayName = message.fromAddr?.asStringUriOnly().getDisplayNameFromSipAddress(lc: lc!, logger: NotificationService.log, groupId: APP_GROUP_ID) { from = fromDisplayName @@ -196,7 +202,11 @@ class NotificationService: UNNotificationServiceExtension { if let showMsg = lc!.config?.getBool(section: "app", key: "show_msg_in_notif", defaultValue: true), showMsg == true { if let subject = message.subject as String?, subject != "" { msgData.subtitle = subject - msgData.body = from + " : " + content + if reactionContent == nil { + msgData.body = from + " : " + content + } else { + msgData.body = from + NSLocalizedString(" has reacted by ", comment: "") + reactionContent! + NSLocalizedString(" to: ", comment: "") + content + } } else { msgData.subtitle = from msgData.body = content