From 6b1090f33b14c0c543eb3801ba96acdf7e842822 Mon Sep 17 00:00:00 2001
From: Taras Smakula <tarassmakula@gmail.com>
Date: Mon, 18 Sep 2023 16:37:13 +0300
Subject: [PATCH] Remove user id prefix for replies

---
 .../session/room/send/LocalEchoEventFactory.kt       | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/send/LocalEchoEventFactory.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/send/LocalEchoEventFactory.kt
index 05350991..d0043d3d 100644
--- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/send/LocalEchoEventFactory.kt
+++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/send/LocalEchoEventFactory.kt
@@ -333,10 +333,6 @@ internal class LocalEchoEventFactory @Inject constructor(
                 bodyFormatted,
                 newBodyFormatted
         )
-        //
-        // > <@alice:example.org> This is the original body
-        //
-        val replyFallback = buildReplyFallback(body, originalEvent.root.senderId ?: "", newBodyText)
 
         return createMessageEvent(
                 roomId,
@@ -347,7 +343,7 @@ internal class LocalEchoEventFactory @Inject constructor(
                         newContent = MessageTextContent(
                                 msgType = msgType,
                                 format = MessageFormat.FORMAT_MATRIX_HTML,
-                                body = replyFallback,
+                                body = newBodyText,
                                 formattedBody = replyFormatted
                         )
                                 .toContent()
@@ -639,16 +635,12 @@ internal class LocalEchoEventFactory @Inject constructor(
                 bodyFormatted,
                 finalReplyTextFormatted
         )
-        //
-        // > <@alice:example.org> This is the original body
-        //
-        val replyFallback = buildReplyFallback(body, userId, replyText.toString())
 
         val eventId = eventReplied.root.eventId ?: return null
         return MessageTextContent(
                 msgType = MessageType.MSGTYPE_TEXT,
                 format = MessageFormat.FORMAT_MATRIX_HTML,
-                body = replyFallback,
+                body = replyText.toString(),
                 formattedBody = replyFormatted,
                 relatesTo = generateReplyRelationContent(
                         eventId = eventId,
-- 
GitLab