summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-09-27 21:09:52 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-09-27 21:09:52 +0300
commit5f97f4c8be447b9c083fb4f37e6093e939bb54e8 (patch)
tree6cd4a7daced6bd15ce488c2fd99d0f6bdeb7422b /protocols
parenteb30a73faa4b0384f3707f44067d9f6e9356d640 (diff)
fixes #944 ( [Discord] Recent change breaks clist behavior (no longer displaying topics in contact list)
Diffstat (limited to 'protocols')
-rw-r--r--protocols/Discord/src/utils.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/protocols/Discord/src/utils.cpp b/protocols/Discord/src/utils.cpp
index 2c8deddc32..b60e03df6b 100644
--- a/protocols/Discord/src/utils.cpp
+++ b/protocols/Discord/src/utils.cpp
@@ -134,12 +134,16 @@ SnowFlake CDiscordProto::getId(MCONTACT hContact, const char *szSetting)
void CDiscordProto::setId(const char *szSetting, SnowFlake iValue)
{
- db_set_blob(0, m_szModuleName, szSetting, &iValue, sizeof(iValue));
+ SnowFlake oldVal = getId(szSetting);
+ if (oldVal != iValue)
+ db_set_blob(0, m_szModuleName, szSetting, &iValue, sizeof(iValue));
}
void CDiscordProto::setId(MCONTACT hContact, const char *szSetting, SnowFlake iValue)
{
- db_set_blob(hContact, m_szModuleName, szSetting, &iValue, sizeof(iValue));
+ SnowFlake oldVal = getId(hContact, szSetting);
+ if (oldVal != iValue)
+ db_set_blob(hContact, m_szModuleName, szSetting, &iValue, sizeof(iValue));
}
/////////////////////////////////////////////////////////////////////////////////////////