diff options
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/Telegram/src/proto.cpp | 9 | ||||
-rw-r--r-- | protocols/Telegram/src/proto.h | 2 |
2 files changed, 11 insertions, 0 deletions
diff --git a/protocols/Telegram/src/proto.cpp b/protocols/Telegram/src/proto.cpp index be2156be82..d7c72e8062 100644 --- a/protocols/Telegram/src/proto.cpp +++ b/protocols/Telegram/src/proto.cpp @@ -663,3 +663,12 @@ int CTelegramProto::SetStatus(int iNewStatus) return 0; } + +int CTelegramProto::UserIsTyping(MCONTACT hContact, int type) +{ + if (auto *pUser = FindUser(GetId(hContact))) + if (type == PROTOTYPE_SELFTYPING_ON) + SendQuery(new TD::sendChatAction(pUser->chatId, 0, TD::make_object<TD::chatActionTyping>())); + + return 0; +} diff --git a/protocols/Telegram/src/proto.h b/protocols/Telegram/src/proto.h index 3c1661d3f9..dcb85fbfe7 100644 --- a/protocols/Telegram/src/proto.h +++ b/protocols/Telegram/src/proto.h @@ -359,6 +359,8 @@ public: HANDLE SearchByName(const wchar_t *nick, const wchar_t *firstName, const wchar_t *lastName) override; int SendMsg(MCONTACT hContact, MEVENT hReplyEvent, const char *pszMessage) override; int SetStatus(int iNewStatus) override; + + int UserIsTyping(MCONTACT hContact, int type) override; void OnBuildProtoMenu() override; void OnContactAdded(MCONTACT hContact) override; |