Skip to content
This repository has been archived by the owner on Aug 22, 2023. It is now read-only.

Commit

Permalink
TelegramClient::userId()
Browse files Browse the repository at this point in the history
  • Loading branch information
curoviyxru committed Apr 2, 2022
1 parent 62fc90e commit 2c144ce
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions telegramclient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,11 @@ bool TelegramClient::isAuthorized()
return !session.authKey.key.isEmpty() && session.salt && session.authKey.auxHash && session.authKey.id;
}

qint64 TelegramClient::userId()
{
return session.userId;
}

bool TelegramClient::isOpened()
{
return socket.isOpen();
Expand Down
2 changes: 2 additions & 0 deletions telegramclient.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,8 @@ class TelegramClient : public QObject
bool isConnected();
bool apiReady();

qint64 userId();

State getState();

qint64 pingDelayDisconnect(qint64 ping_id, qint32 delay); //TODO: handle pong
Expand Down

0 comments on commit 2c144ce

Please sign in to comment.