Fix display of ForwardMessage

This commit is contained in:
Karlatemp 2021-02-01 10:47:31 +08:00
parent 8bef20bf9d
commit 8e784c383e
No known key found for this signature in database
GPG Key ID: 21FBDDF664FF06F8
2 changed files with 8 additions and 1 deletions

View File

@ -65,6 +65,13 @@ internal abstract class SendMessageHandler<C : Contact> {
groupCard = senderName // Cinnamon
) else null
// For ForwardMessage display
val ForwardMessage.INode.groupInfo: MsgComm.GroupInfo
get() = MsgComm.GroupInfo(
groupCode = if (isToGroup) targetGroupCode!! else 0,
groupCard = senderName
)
val isToGroup: Boolean get() = contact is Group
suspend fun MessageChain.convertToLongMessageIfNeeded(

View File

@ -62,7 +62,7 @@ internal fun Collection<ForwardMessage.INode>.calculateValidationData(
msgId = 1
),
msgType = 82, // troop
groupInfo = handler.groupInfo,
groupInfo = handler.run { chain.groupInfo },
isSrcMsg = false
),
msgBody = ImMsgBody.MsgBody(