tg_cli: allow username as supergroup_id.
GitOrigin-RevId: ffd0fcdd4e17be3151aeb3cd5e3c51e466e68c59
This commit is contained in:
parent
5bea5f83b2
commit
692fddfe91
@ -524,8 +524,11 @@ class CliClient final : public Actor {
|
||||
return result;
|
||||
}
|
||||
|
||||
static int32 as_supergroup_id(Slice str) {
|
||||
int32 as_supergroup_id(Slice str) {
|
||||
str = trim(str);
|
||||
if (str[0] == '@') {
|
||||
return username_to_supergroup_id_[to_lower(str.substr(1))];
|
||||
}
|
||||
auto result = to_integer<int64>(str);
|
||||
int64 shift = static_cast<int64>(-1000000000000ll);
|
||||
if (result <= shift) {
|
||||
|
Reference in New Issue
Block a user