enable to set mention chip for email guests 2

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
Marcel Hibbe 2024-11-19 21:57:05 +01:00
parent ca9e2d4932
commit 02d0a65909
No known key found for this signature in database
GPG key ID: C793F8B59F43CE7B
3 changed files with 4 additions and 3 deletions

View file

@ -856,7 +856,8 @@ class MessageInputFragment : Fragment() {
val shouldQuote = mentionId.contains(" ") || val shouldQuote = mentionId.contains(" ") ||
mentionId.contains("@") || mentionId.contains("@") ||
mentionId.startsWith("guest/") || mentionId.startsWith("guest/") ||
mentionId.startsWith("group/") mentionId.startsWith("group/") ||
mentionId.startsWith("email/")
if (shouldQuote) { if (shouldQuote) {
mentionId = "\"" + mentionId + "\"" mentionId = "\"" + mentionId + "\""
} }

View file

@ -29,7 +29,7 @@ class ChatUtils {
if (individualHashMap != null) { if (individualHashMap != null) {
val type = individualHashMap["type"] 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"]) resultMessage?.replace("{$key}", "@" + individualHashMap["name"])
} else if (type == "geo-location") { } else if (type == "geo-location") {
individualHashMap["name"] individualHashMap["name"]

View file

@ -176,7 +176,7 @@ object DisplayUtils {
chip.setBounds(0, 0, chip.intrinsicWidth, chip.intrinsicHeight) chip.setBounds(0, 0, chip.intrinsicWidth, chip.intrinsicHeight)
if (!isCallOrGroup) { if (!isCallOrGroup) {
var url = getUrlForAvatar(conversationUser.baseUrl, id, false) var url = getUrlForAvatar(conversationUser.baseUrl, id, false)
if ("guests" == type || "guest" == type) { if ("guests" == type || "guest" == type || "email" == type) {
url = getUrlForGuestAvatar( url = getUrlForGuestAvatar(
conversationUser.baseUrl, label.toString(), true conversationUser.baseUrl, label.toString(), true
) )