snc: fix resolving identifier

Signed-off-by: Sumner Evans <sumner.evans@automattic.com>
This commit is contained in:
Sumner Evans
2024-10-07 16:32:48 -06:00
parent 4821865cad
commit 96331761b8
-2
View File
@@ -89,8 +89,6 @@ func (t *TelegramClient) ResolveIdentifier(ctx context.Context, identifier strin
if entityType == ids.PeerTypeUser && (err == nil || userID != 0) {
// We know this username.
return t.getResolveIdentifierResponseForUserID(ctx, userID)
} else if entityType != ids.PeerTypeUser {
return nil, fmt.Errorf("unexpected peer type: %s", entityType)
} else {
// We don't know this username, try to resolve the username from
// Telegram.