Skip to content

Commit

Permalink
Revert "use label"
Browse files Browse the repository at this point in the history
This reverts commit d9cbe3e.
  • Loading branch information
sowjanyakch committed Feb 7, 2025
1 parent d9cbe3e commit a003abe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -838,17 +838,15 @@ class MessageInputFragment : Fragment() {
for (i in mentionSpans.indices) {
mentionSpan = mentionSpans[i]
var mentionId = mentionSpan.id
var label = mentionSpan.label
val shouldQuote = mentionId.contains(" ") ||
mentionId.contains("@") ||
mentionId.startsWith("guest/") ||
mentionId.startsWith("group/") ||
mentionId.startsWith("email/")
if (shouldQuote) {
mentionId = "\"" + mentionId + "\""
label = "\"" + label + "\""
}
editable.replace(editable.getSpanStart(mentionSpan), editable.getSpanEnd(mentionSpan), "@$label")
editable.replace(editable.getSpanStart(mentionSpan), editable.getSpanEnd(mentionSpan), "@$mentionId")
}

binding.fragmentMessageInputView.inputEditText?.setText("")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ class ChatUtils {

if (individualHashMap != null) {
val type = individualHashMap["type"]
resultMessage = if (type == "user" || type == "guest" || type == "call" || type == "email" ||
type == "circle" || type == "teams") {
resultMessage = if (type == "user" || type == "guest" || type == "call" || type == "email") {
resultMessage?.replace("{$key}", "@" + individualHashMap["name"])
} else if (type == "geo-location") {
individualHashMap["name"]
Expand Down

0 comments on commit a003abe

Please sign in to comment.