1
0
mirror of https://github.com/nextcloud/talk-android synced 2025-06-24 06:00:49 +01:00

Include mentions in the attachments

Signed-off-by: sowjanyakch <sowjanya.kch@gmail.com>
This commit is contained in:
sowjanyakch 2025-06-02 14:59:32 +02:00
parent 131723317b
commit 262205b615
No known key found for this signature in database
GPG Key ID: F7AA2A8B65B50220
2 changed files with 4 additions and 3 deletions
app/src/main/java/com/nextcloud/talk
adapters/items
models/json/chat

View File

@ -431,9 +431,9 @@ class ConversationItem(
)
return lastMessage
} else if (MessageType.SINGLE_NC_ATTACHMENT_MESSAGE == chatMessage?.getCalculateMessageType()) {
var attachmentName = chatMessage.message
var attachmentName = chatMessage.text
if (attachmentName == "{file}") {
attachmentName = chatMessage.messageParameters?.get("file")?.get("name")
attachmentName = chatMessage.messageParameters?.get("file")?.get("name")!!
}
val author = authorName(chatMessage)

View File

@ -29,7 +29,8 @@ class ChatUtils {
if (individualHashMap != null) {
val type = individualHashMap["type"]
resultMessage = if (type == "user" || type == "guest" || type == "call" || type == "email") {
resultMessage = if (type == "user" || type == "guest" || type == "call" || type == "email" ||
type == "user-group" || type == "circle") {
resultMessage?.replace("{$key}", "@" + individualHashMap["name"])
} else if (type == "geo-location") {
individualHashMap["name"]