diff --git a/app/src/main/java/com/nextcloud/talk/chat/MessageInputFragment.kt b/app/src/main/java/com/nextcloud/talk/chat/MessageInputFragment.kt index fcbe494c9..87f7a8fd2 100644 --- a/app/src/main/java/com/nextcloud/talk/chat/MessageInputFragment.kt +++ b/app/src/main/java/com/nextcloud/talk/chat/MessageInputFragment.kt @@ -856,7 +856,8 @@ class MessageInputFragment : Fragment() { val shouldQuote = mentionId.contains(" ") || mentionId.contains("@") || mentionId.startsWith("guest/") || - mentionId.startsWith("group/") + mentionId.startsWith("group/") || + mentionId.startsWith("email/") if (shouldQuote) { mentionId = "\"" + mentionId + "\"" } diff --git a/app/src/main/java/com/nextcloud/talk/models/json/chat/ChatUtils.kt b/app/src/main/java/com/nextcloud/talk/models/json/chat/ChatUtils.kt index c8f2da614..6a7a70f31 100644 --- a/app/src/main/java/com/nextcloud/talk/models/json/chat/ChatUtils.kt +++ b/app/src/main/java/com/nextcloud/talk/models/json/chat/ChatUtils.kt @@ -29,7 +29,7 @@ class ChatUtils { if (individualHashMap != null) { val type = individualHashMap["type"] - resultMessage = if (type == "user" || type == "guest" || type == "call") { + resultMessage = if (type == "user" || type == "guest" || type == "call" || type == "email") { resultMessage?.replace("{$key}", "@" + individualHashMap["name"]) } else if (type == "geo-location") { individualHashMap["name"] diff --git a/app/src/main/java/com/nextcloud/talk/utils/DisplayUtils.kt b/app/src/main/java/com/nextcloud/talk/utils/DisplayUtils.kt index 532f830bf..cb8268cab 100644 --- a/app/src/main/java/com/nextcloud/talk/utils/DisplayUtils.kt +++ b/app/src/main/java/com/nextcloud/talk/utils/DisplayUtils.kt @@ -176,7 +176,7 @@ object DisplayUtils { chip.setBounds(0, 0, chip.intrinsicWidth, chip.intrinsicHeight) if (!isCallOrGroup) { var url = getUrlForAvatar(conversationUser.baseUrl, id, false) - if ("guests" == type || "guest" == type) { + if ("guests" == type || "guest" == type || "email" == type) { url = getUrlForGuestAvatar( conversationUser.baseUrl, label.toString(), true )