Improve equals

This commit is contained in:
Him188 2020-02-29 13:24:24 +08:00
parent 9f7dec2643
commit 756e8b537e

View File

@ -300,7 +300,7 @@ internal class MemberImpl(
@Suppress("DuplicatedCode")
override fun equals(other: Any?): Boolean { // 不要删除. trust me
if (this === other) return true
if (other !is Contact) return false
if (other !is Member) return false
if (this::class != other::class) return false
return this.id == other.id && this.bot == other.bot
}