summaryrefslogtreecommitdiff
path: root/protocols/Discord/src/proto.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-11-27 20:43:55 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-11-27 20:43:55 +0300
commit40c4c15d469744813f75e73ae9edf82485c1862f (patch)
treee5c0e71b2b8fc3c670a28a8c8d0d4aaa4e86d298 /protocols/Discord/src/proto.cpp
parent8a57ca7afd4cce23a6a9112a64e3a2aeee7d96be (diff)
fixes #1638 ([Discord] Direct messages from temporary contacts cause the contact to be shown as if it were a regular friend)
Diffstat (limited to 'protocols/Discord/src/proto.cpp')
-rw-r--r--protocols/Discord/src/proto.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/protocols/Discord/src/proto.cpp b/protocols/Discord/src/proto.cpp
index 50e9481b12..b95b393c62 100644
--- a/protocols/Discord/src/proto.cpp
+++ b/protocols/Discord/src/proto.cpp
@@ -59,6 +59,8 @@ CDiscordProto::CDiscordProto(const char *proto_name, const wchar_t *username) :
CreateProtoService(PS_GETMYAVATAR, &CDiscordProto::GetMyAvatar);
CreateProtoService(PS_SETMYAVATAR, &CDiscordProto::SetMyAvatar);
+ CreateProtoService(PS_MENU_REQAUTH, &CDiscordProto::RequestFriendship);
+
// Events
HookProtoEvent(ME_OPT_INITIALISE, &CDiscordProto::OnOptionsInit);
HookProtoEvent(ME_DB_EVENT_MARKED_READ, &CDiscordProto::OnDbEventRead);
@@ -486,6 +488,14 @@ void CDiscordProto::OnContactDeleted(MCONTACT hContact)
/////////////////////////////////////////////////////////////////////////////////////////
+INT_PTR CDiscordProto::RequestFriendship(WPARAM hContact, LPARAM)
+{
+ AuthRequest(hContact, 0);
+ return 0;
+}
+
+/////////////////////////////////////////////////////////////////////////////////////////
+
struct SendFileThreadParam
{
MCONTACT hContact;