diff options
-rw-r--r-- | protocols/Discord/src/proto.cpp | 11 | ||||
-rw-r--r-- | protocols/Discord/src/proto.h | 2 |
2 files changed, 13 insertions, 0 deletions
diff --git a/protocols/Discord/src/proto.cpp b/protocols/Discord/src/proto.cpp index 50b6aeeeac..d4ac7c11da 100644 --- a/protocols/Discord/src/proto.cpp +++ b/protocols/Discord/src/proto.cpp @@ -393,6 +393,17 @@ int CDiscordProto::SendMsg(MCONTACT hContact, int /*flags*/, const char *pszSrc) ///////////////////////////////////////////////////////////////////////////////////////// +int CDiscordProto::UserIsTyping(MCONTACT hContact, int type) +{ + if (type == PROTOTYPE_SELFTYPING_ON) { + CMStringA szUrl(FORMAT, "/channels/%lld/typing", getId(hContact, DB_KEY_CHANNELID)); + Push(new AsyncHttpRequest(this, REQUEST_POST, szUrl, NULL)); + } + return 0; +} + +///////////////////////////////////////////////////////////////////////////////////////// + void CDiscordProto::MarkReadTimerProc(HWND hwnd, UINT, UINT_PTR id, DWORD) { CDiscordProto *ppro = (CDiscordProto*)(id - 1); diff --git a/protocols/Discord/src/proto.h b/protocols/Discord/src/proto.h index 122b3a9e40..fbe1b9d2b3 100644 --- a/protocols/Discord/src/proto.h +++ b/protocols/Discord/src/proto.h @@ -254,6 +254,8 @@ public: virtual HANDLE __cdecl SendFile(MCONTACT hContact, const wchar_t *szDescription, wchar_t **ppszFiles) override; + virtual int __cdecl UserIsTyping(MCONTACT hContact, int type) override; + virtual int __cdecl SetStatus(int iNewStatus) override; virtual int __cdecl OnEvent(PROTOEVENTTYPE, WPARAM, LPARAM) override; |