Fix / avoid newlines and ws in reply event representations

This commit is contained in:
Valere 2019-05-27 18:21:59 +02:00
parent 4a4c0a3da1
commit 71ea1c5f9b

View File

@ -231,16 +231,8 @@ internal class LocalEchoEventFactory(private val credentials: Credentials, priva
// This is where the reply goes.
val body = bodyForReply(eventReplied.content.toModel<MessageContent>())
val replyFallbackTemplateFormatted = """
<mx-reply>
<blockquote>
<a href="%s">${stringProvider.getString(R.string.in_reply_to)}</a>
<a href="%s">%s</a>
<br />
%s
</blockquote>
</mx-reply>
%s
""".trim().format(permalink, userLink, userId, body.second ?: body.first, replyText)
<mx-reply><blockquote><a href="%s">${stringProvider.getString(R.string.in_reply_to)}</a><a href="%s">%s</a><br />%s</blockquote></mx-reply>%s
""".trimIndent().format(permalink, userLink, userId, body.second ?: body.first, replyText)
//
// > <@alice:example.org> This is the original body
//