mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-22 16:23:48 +00:00
fix "equals" of Ysername
This commit is contained in:
parent
45ba325f1b
commit
0009d211bc
@ -29,9 +29,10 @@ data class Username(
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun equals(other: Any?): Boolean {
|
override fun equals(other: Any?): Boolean {
|
||||||
return super.equals(other) || other ?.let {
|
return super.equals(other) || when (other) {
|
||||||
super.equals("@$it")
|
is String -> super.equals("@$other")
|
||||||
} ?: false
|
else -> false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user