summaryrefslogtreecommitdiff
path: root/src/remoteauth/remoteauthclient.cpp
diff options
context:
space:
mode:
authorouwou <26526779+ouwou@users.noreply.github.com>2023-08-25 20:36:36 -0400
committerouwou <26526779+ouwou@users.noreply.github.com>2023-08-25 20:36:36 -0400
commitccabaa44d6954812e7a8582246d3aa14a749ccc9 (patch)
tree3ecc78516971b709419e93bc75f2709a544c3f40 /src/remoteauth/remoteauthclient.cpp
parent2bc709bf3ff54b0104fb0bd8e8d80ffd1ba84586 (diff)
parenteea5987f379cd76786ace382da09dd687ecca28a (diff)
downloadabaddon-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.cpp8
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 {