summaryrefslogtreecommitdiff
path: root/protocols/Discord/src/connection.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-01-04 00:34:25 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-01-04 00:34:25 +0300
commitac1d88965de3022be2f484c2f58185ae75b4fe00 (patch)
treece2e5ddf89bb9acf1f13a698d4d4a9e55d8a4520 /protocols/Discord/src/connection.cpp
parentf82e226c107565f8dac8bc327b945648377c0eba (diff)
gateway support: beginning
Diffstat (limited to 'protocols/Discord/src/connection.cpp')
-rw-r--r--protocols/Discord/src/connection.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/protocols/Discord/src/connection.cpp b/protocols/Discord/src/connection.cpp
index db3d667761..bc48d402e4 100644
--- a/protocols/Discord/src/connection.cpp
+++ b/protocols/Discord/src/connection.cpp
@@ -67,6 +67,11 @@ void CDiscordProto::OnLoggedIn()
Push(new AsyncHttpRequest(this, REQUEST_GET, "/users/@me/guilds", &CDiscordProto::OnReceiveGuilds));
Push(new AsyncHttpRequest(this, REQUEST_GET, "/users/@me/channels", &CDiscordProto::OnReceiveChannels));
Push(new AsyncHttpRequest(this, REQUEST_GET, "/users/@me/relationships", &CDiscordProto::OnReceiveFriends));
+
+ if (m_szGateway.IsEmpty())
+ Push(new AsyncHttpRequest(this, REQUEST_GET, "/gateway", &CDiscordProto::OnReceiveGateway));
+ else
+ ForkThread(&CDiscordProto::GatewayThread, NULL);
}
void CDiscordProto::OnLoggedOut()