diff options
author | ouwou <26526779+ouwou@users.noreply.github.com> | 2023-08-25 20:36:36 -0400 |
---|---|---|
committer | ouwou <26526779+ouwou@users.noreply.github.com> | 2023-08-25 20:36:36 -0400 |
commit | ccabaa44d6954812e7a8582246d3aa14a749ccc9 (patch) | |
tree | 3ecc78516971b709419e93bc75f2709a544c3f40 /src/remoteauth/remoteauthclient.cpp | |
parent | 2bc709bf3ff54b0104fb0bd8e8d80ffd1ba84586 (diff) | |
parent | eea5987f379cd76786ace382da09dd687ecca28a (diff) | |
download | abaddon-portaudio-ccabaa44d6954812e7a8582246d3aa14a749ccc9.tar.gz abaddon-portaudio-ccabaa44d6954812e7a8582246d3aa14a749ccc9.zip |
Merge branch 'master' into rnnoise
Diffstat (limited to 'src/remoteauth/remoteauthclient.cpp')
-rw-r--r-- | src/remoteauth/remoteauthclient.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/remoteauth/remoteauthclient.cpp b/src/remoteauth/remoteauthclient.cpp index 7653b78..5103c8d 100644 --- a/src/remoteauth/remoteauthclient.cpp +++ b/src/remoteauth/remoteauthclient.cpp @@ -111,9 +111,10 @@ void RemoteAuthClient::HandleGatewayPendingTicket(const nlohmann::json &j) { const auto encrypted_payload = Glib::Base64::decode(j.at("encrypted_user_payload").get<std::string>()); const auto payload = Decrypt(reinterpret_cast<const unsigned char *>(encrypted_payload.data()), encrypted_payload.size()); - m_log->trace("User payload: {}", std::string(payload.begin(), payload.end())); + const auto payload_str = std::string(payload.begin(), payload.end()); + m_log->trace("User payload: {}", payload_str); - const std::vector<Glib::ustring> user_info = Glib::Regex::split_simple(":", std::string(payload.begin(), payload.end())); + const std::vector<Glib::ustring> user_info = Glib::Regex::split_simple(":", payload_str); Snowflake user_id; std::string discriminator; std::string avatar_hash; @@ -140,7 +141,8 @@ void RemoteAuthClient::HandleGatewayCancel(const nlohmann::json &j) { void RemoteAuthClient::OnRemoteAuthLoginResponse(const std::optional<std::string> &encrypted_token, DiscordError err) { if (!encrypted_token.has_value()) { - m_log->error("Remote auth login failed: {}", static_cast<int>(err)); + const auto err_int = static_cast<int>(err); + m_log->error("Remote auth login failed: {}", err_int); if (err == DiscordError::CAPTCHA_REQUIRED) { m_signal_error.emit("Discord is requiring a captcha. You must use a web browser to log in."); } else { |