From e855b0922f15871e8deb07562f3d5c8ba675bf93 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 6 Mar 2019 20:34:51 +0300 Subject: related to #1863 ([Discord] Make option to turn off group chats/channels ; & add manual history sync from IMs/DMs (private chat)) --- protocols/Discord/src/proto.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'protocols/Discord/src/proto.cpp') diff --git a/protocols/Discord/src/proto.cpp b/protocols/Discord/src/proto.cpp index b01d48ce58..e20cdb18ca 100644 --- a/protocols/Discord/src/proto.cpp +++ b/protocols/Discord/src/proto.cpp @@ -110,6 +110,11 @@ void CDiscordProto::OnModulesLoaded() pNew->wszUsername = ptrW(getWStringA(hContact, DB_KEY_NICK)); pNew->iDiscriminator = getDword(hContact, DB_KEY_DISCR); arUsers.insert(pNew); + + // set EnableSync = 1 by default for all existing guilds + if (getByte(hContact, "ChatRoom") == 2) + if (getDword(hContact, "EnableSync", -1) == -1) + setDword(hContact, "EnableSync", 1); } GCREGISTER gcr = {}; -- cgit v1.2.3