diff options
author | George Hazan <ghazan@miranda.im> | 2017-02-02 22:41:39 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2017-02-02 22:41:39 +0300 |
commit | 21dc4a9453ed2a837e6a8d6b45ccd932d26fdfe8 (patch) | |
tree | 658fa4cec81af096d21d49b08c078060e047c15a /protocols/Discord/src/utils.cpp | |
parent | 38d7885b91b6026b1a518e8c7d34172a08da4c87 (diff) |
- code cleaning;
- version bump
Diffstat (limited to 'protocols/Discord/src/utils.cpp')
-rw-r--r-- | protocols/Discord/src/utils.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/protocols/Discord/src/utils.cpp b/protocols/Discord/src/utils.cpp index 8a2041c534..f84ecfb61a 100644 --- a/protocols/Discord/src/utils.cpp +++ b/protocols/Discord/src/utils.cpp @@ -100,6 +100,11 @@ int SerialNext() ///////////////////////////////////////////////////////////////////////////////////////// +SnowFlake getId(const JSONNode &pNode) +{ + return _wtoi64(pNode.as_mstring()); +} + SnowFlake CDiscordProto::getId(const char *szSetting) { DBVARIANT dbv; @@ -167,7 +172,7 @@ CDiscordUser* CDiscordProto::FindUserByChannel(SnowFlake channelId) CDiscordUser* CDiscordProto::PrepareUser(const JSONNode &user) { - SnowFlake id = _wtoi64(user["id"].as_mstring()); + SnowFlake id = ::getId(user["id"]); if (id == m_ownId) return g_myUser; |