diff options
Diffstat (limited to 'protocols/Discord/src/proto.cpp')
-rw-r--r-- | protocols/Discord/src/proto.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/protocols/Discord/src/proto.cpp b/protocols/Discord/src/proto.cpp index b8948afe17..72dca1ff6a 100644 --- a/protocols/Discord/src/proto.cpp +++ b/protocols/Discord/src/proto.cpp @@ -448,9 +448,9 @@ int CDiscordProto::SetAwayMsg(int iStatus, const wchar_t *msg) if (!mir_wstrcmp(msg, pwszMessage)) return 0; - pwszMessage = mir_wstrdup(msg); + replaceStrW(pwszMessage, msg); - JSONNode status; status.set_name("custom_status"); status << WCHAR_PARAM("text", msg); + JSONNode status; status.set_name("custom_status"); status << WCHAR_PARAM("text", (msg) ? msg : L""); JSONNode root; root << status; Push(new AsyncHttpRequest(this, REQUEST_PATCH, "/users/@me/settings", nullptr, &root)); return 0; |