mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-16 19:22:31 +08:00
Try fix forward message display (#1052)
fix https://github.com/mamoe/mirai/issues/1052#issuecomment-805600071
This commit is contained in:
parent
c071ac5773
commit
a5e85f443e
@ -208,7 +208,7 @@ internal fun RichMessage.Key.longMessage(brief: String, resId: String, timeSecon
|
|||||||
</item>
|
</item>
|
||||||
<source name="聊天记录" icon="" action="" appid="-1"/>
|
<source name="聊天记录" icon="" action="" appid="-1"/>
|
||||||
</msg>
|
</msg>
|
||||||
""".trimIndent()
|
""".trimIndent().trim()
|
||||||
|
|
||||||
return LongMessageInternal(template, resId)
|
return LongMessageInternal(template, resId)
|
||||||
}
|
}
|
||||||
@ -220,7 +220,7 @@ internal fun RichMessage.Key.forwardMessage(
|
|||||||
forwardMessage: ForwardMessage,
|
forwardMessage: ForwardMessage,
|
||||||
): ForwardMessageInternal = with(forwardMessage) {
|
): ForwardMessageInternal = with(forwardMessage) {
|
||||||
val template = """
|
val template = """
|
||||||
<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<msg serviceID="35" templateID="1" action="viewMultiMsg" brief="${brief.take(30)}"
|
<msg serviceID="35" templateID="1" action="viewMultiMsg" brief="${brief.take(30)}"
|
||||||
m_resid="$resId" m_fileName="$timeSeconds"
|
m_resid="$resId" m_fileName="$timeSeconds"
|
||||||
tSum="3" sourceMsgId="0" url="" flag="3" adverSign="0" multiMsgFlag="0">
|
tSum="3" sourceMsgId="0" url="" flag="3" adverSign="0" multiMsgFlag="0">
|
||||||
@ -245,6 +245,6 @@ internal fun RichMessage.Key.forwardMessage(
|
|||||||
</item>
|
</item>
|
||||||
<source name="${source.take(50)}" icon="" action="" appid="-1"/>
|
<source name="${source.take(50)}" icon="" action="" appid="-1"/>
|
||||||
</msg>
|
</msg>
|
||||||
""".trimIndent().replace("\n", " ")
|
""".trimIndent().replace("\n", " ").trim()
|
||||||
return ForwardMessageInternal(template, resId)
|
return ForwardMessageInternal(template, resId)
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user