mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-24 06:50:08 +08:00
Fix display of ForwardMessage
This commit is contained in:
parent
8bef20bf9d
commit
8e784c383e
@ -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(
|
||||
|
@ -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(
|
||||
|
Loading…
Reference in New Issue
Block a user