diff options
author | George Hazan <ghazan@miranda.im> | 2017-02-22 14:33:22 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2017-02-22 14:33:22 +0300 |
commit | b36289b6ed6dfdc74e42ac89a8d873cee058453d (patch) | |
tree | 8507e808fb06e068aeb48bfab51d5f519615cbd2 | |
parent | e940fb548345fb5e926a0d87f8024257c692726d (diff) |
fix for the nickname reset
-rw-r--r-- | protocols/Discord/src/dispatch.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/protocols/Discord/src/dispatch.cpp b/protocols/Discord/src/dispatch.cpp index 46af932fbf..d960bf1cac 100644 --- a/protocols/Discord/src/dispatch.cpp +++ b/protocols/Discord/src/dispatch.cpp @@ -355,6 +355,8 @@ void CDiscordProto::OnCommandGuildMemberUpdated(const JSONNode &pRoot) SnowFlake guildId = ::getId(pRoot["guild_id"]); CMStringW wszUserId = pRoot["user"]["id"].as_mstring(); CMStringW wszUserNick = pRoot["nick"].as_mstring(), wszOldNick; + if (wszUserNick.IsEmpty()) + wszUserNick = pRoot["user"]["username"].as_mstring() + L"#" + pRoot["user"]["discriminator"].as_mstring(); for (int i = 0; i < arUsers.getCount(); i++) { CDiscordUser &pUser = arUsers[i]; |