diff --git a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/message/data/MessageChain.kt b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/message/data/MessageChain.kt index c59e942ac..8426a0aef 100644 --- a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/message/data/MessageChain.kt +++ b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/message/data/MessageChain.kt @@ -381,7 +381,7 @@ object EmptyMessageChain : MessageChain by MessageChainImplByIterable(emptyList( */ object NullMessageChain : MessageChain { override fun toString(): String = "NullMessageChain" - override fun equals(other: Any?): Boolean = other == null + override fun equals(other: Any?): Boolean = other === this override fun contains(sub: String): Boolean = error("accessing NullMessageChain") override fun followedBy(tail: Message): CombinedMessage = CombinedMessage(left = EmptyMessageChain, element = tail) override fun iterator(): MutableIterator = error("accessing NullMessageChain")