summaryrefslogtreecommitdiff
path: root/protocols/Discord/src/proto.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2023-03-04 18:05:38 +0300
committerGeorge Hazan <ghazan@miranda.im>2023-03-04 18:05:38 +0300
commitc4c1ce437199d554133859c635c3b986f1b353a9 (patch)
tree3a42f02723d5cb8d578bd7a21e1fc672cb700fdb /protocols/Discord/src/proto.cpp
parent98786d882525db4b506eddb011901c60d51857ac (diff)
fixes #3333 (Tox: search in Find/Add contacts tries to search any random input)
Diffstat (limited to 'protocols/Discord/src/proto.cpp')
-rw-r--r--protocols/Discord/src/proto.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/protocols/Discord/src/proto.cpp b/protocols/Discord/src/proto.cpp
index cf5bd0671f..6f0ff667bb 100644
--- a/protocols/Discord/src/proto.cpp
+++ b/protocols/Discord/src/proto.cpp
@@ -301,13 +301,13 @@ void CDiscordProto::SearchThread(void *param)
psr.firstName.w = L"";
psr.lastName.w = L"";
psr.id.w = L"";
- ProtoBroadcastAck(0, ACKTYPE_SEARCH, ACKRESULT_DATA, (HANDLE)1, (LPARAM)&psr);
+ ProtoBroadcastAck(0, ACKTYPE_SEARCH, ACKRESULT_DATA, this, (LPARAM)&psr);
- ProtoBroadcastAck(0, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)1, 0);
+ ProtoBroadcastAck(0, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, this, 0);
mir_free(param);
}
-HWND CDiscordProto::SearchAdvanced(HWND hwndDlg)
+HANDLE CDiscordProto::SearchAdvanced(HWND hwndDlg)
{
if (!m_bOnline || !IsWindow(hwndDlg))
return nullptr;
@@ -322,7 +322,7 @@ HWND CDiscordProto::SearchAdvanced(HWND hwndDlg)
return nullptr;
ForkThread(&CDiscordProto::SearchThread, mir_wstrdup(wszNick));
- return (HWND)1;
+ return this;
}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -332,7 +332,7 @@ void CDiscordProto::OnReceiveUserinfo(NETLIBHTTPREQUEST *pReply, AsyncHttpReques
{
JsonReply root(pReply);
if (!root) {
- ProtoBroadcastAck(0, ACKTYPE_SEARCH, ACKRESULT_FAILED, (HANDLE)1);
+ ProtoBroadcastAck(0, ACKTYPE_SEARCH, ACKRESULT_FAILED, this);
return;
}