From 96ed65442ddaeb95588a2f10462cf7f6696c1b9d Mon Sep 17 00:00:00 2001 From: Him188 Date: Thu, 23 Apr 2020 21:36:39 +0800 Subject: [PATCH] Fix missing `ForwardMessage.Key` in `firstOrNull` --- .../src/commonMain/kotlin/net.mamoe.mirai/message/data/impl.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/message/data/impl.kt b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/message/data/impl.kt index e83658e35..77beea543 100644 --- a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/message/data/impl.kt +++ b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/message/data/impl.kt @@ -204,6 +204,7 @@ internal fun MessageChain.firstOrNullImpl(key: Message.Key): M? FriendFlashImage -> firstIsInstanceOrNull() CustomMessage -> firstIsInstanceOrNull() CustomMessageMetadata -> firstIsInstanceOrNull() + ForwardMessage -> firstIsInstanceOrNull() else -> { this.forEach { message -> if (message is CustomMessage) {