1
0
mirror of https://github.com/mamoe/mirai.git synced 2025-04-25 21:23:55 +08:00

Implement MessageChain.hashCode and MessageChain.equals

This commit is contained in:
Him188 2020-12-23 17:41:01 +08:00
parent ca04c180f0
commit ed2c223125

View File

@ -179,6 +179,9 @@ internal data class MessageChainImpl constructor(
private val contentToStringTemp: String by lazy { this.delegate.joinToString("") { it.contentToString() } }
override fun contentToString(): String = contentToStringTemp
override fun hashCode(): Int = delegate.hashCode()
override fun equals(other: Any?): Boolean = other is MessageChainImpl && other.delegate == this.delegate
}
@Suppress("FunctionName")