diff options
author | George Hazan <ghazan@miranda.im> | 2017-01-04 00:34:25 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2017-01-04 00:34:25 +0300 |
commit | ac1d88965de3022be2f484c2f58185ae75b4fe00 (patch) | |
tree | ce2e5ddf89bb9acf1f13a698d4d4a9e55d8a4520 /protocols/Discord/src/connection.cpp | |
parent | f82e226c107565f8dac8bc327b945648377c0eba (diff) |
gateway support: beginning
Diffstat (limited to 'protocols/Discord/src/connection.cpp')
-rw-r--r-- | protocols/Discord/src/connection.cpp | 5 |
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() |