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
1 changed files with 2 additions and 10 deletions

View File

@ -231,16 +231,8 @@ internal class LocalEchoEventFactory(private val credentials: Credentials, priva
// This is where the reply goes. // This is where the reply goes.
val body = bodyForReply(eventReplied.content.toModel<MessageContent>()) val body = bodyForReply(eventReplied.content.toModel<MessageContent>())
val replyFallbackTemplateFormatted = """ val replyFallbackTemplateFormatted = """
<mx-reply> <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
<blockquote> """.trimIndent().format(permalink, userLink, userId, body.second ?: body.first, replyText)
<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)
// //
// > <@alice:example.org> This is the original body // > <@alice:example.org> This is the original body
// //