set user-agent through ini

This commit is contained in:
ouwou
2020-11-27 01:37:01 -05:00
parent 1463d8da9e
commit ae77bfd1d1
7 changed files with 46 additions and 10 deletions

View File

@@ -421,6 +421,11 @@ void DiscordClient::UpdateToken(std::string token) {
}
}
void DiscordClient::SetUserAgent(std::string agent) {
m_http.SetUserAgent(agent);
m_websocket.SetUserAgent(agent);
}
void DiscordClient::HandleGatewayMessageRaw(std::string str) {
// handles multiple zlib compressed messages, calling HandleGatewayMessage when a full message is received
std::vector<uint8_t> buf(str.begin(), str.end());