mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2025-09-02 14:49:47 +00:00
fix "equals" of Ysername
This commit is contained in:
@@ -29,9 +29,10 @@ data class Username(
|
||||
}
|
||||
|
||||
override fun equals(other: Any?): Boolean {
|
||||
return super.equals(other) || other ?.let {
|
||||
super.equals("@$it")
|
||||
} ?: false
|
||||
return super.equals(other) || when (other) {
|
||||
is String -> super.equals("@$other")
|
||||
else -> false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user