mirror of
https://github.com/mamoe/mirai.git
synced 2025-03-23 22:00:10 +08:00
Implement MessageChain.hashCode and MessageChain.equals
This commit is contained in:
parent
ca04c180f0
commit
ed2c223125
@ -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")
|
||||
|
Loading…
Reference in New Issue
Block a user