summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2019-03-14 15:20:12 +0300
committerGeorge Hazan <ghazan@miranda.im>2019-03-14 15:20:12 +0300
commit045d56c1e28bef568aaf619346cdd3417469e786 (patch)
tree36f7c41b2947fc8e7cd2d7ddf8a42decf8f77205 /protocols
parenteb5e8631d087f8fa6b100caf37331503b9ac4ed4 (diff)
Discord: we don't need that crutch anymore
Diffstat (limited to 'protocols')
-rw-r--r--protocols/Discord/src/menus.cpp2
-rw-r--r--protocols/Discord/src/proto.h1
-rw-r--r--protocols/Discord/src/server.cpp6
3 files changed, 2 insertions, 7 deletions
diff --git a/protocols/Discord/src/menus.cpp b/protocols/Discord/src/menus.cpp
index 8ebf50613b..6a5d06316e 100644
--- a/protocols/Discord/src/menus.cpp
+++ b/protocols/Discord/src/menus.cpp
@@ -80,10 +80,8 @@ INT_PTR CDiscordProto::OnMenuLoadHistory(WPARAM hContact, LPARAM)
{
auto *pUser = FindUser(getId(hContact, DB_KEY_ID));
if (pUser) {
- pUser->bSkipHistory = true;
RetrieveHistory(pUser, MSG_AFTER, 0, 100);
delSetting(hContact, DB_KEY_LASTMSGID);
- pUser->bSkipHistory = false;
}
return 0;
}
diff --git a/protocols/Discord/src/proto.h b/protocols/Discord/src/proto.h
index 2b296a01f2..3b3d83fda2 100644
--- a/protocols/Discord/src/proto.h
+++ b/protocols/Discord/src/proto.h
@@ -65,7 +65,6 @@ struct CDiscordUser : public MZeroedObject
SnowFlake parentId;
bool bIsPrivate;
bool bIsGroup;
- bool bSkipHistory;
struct CDiscordGuild *pGuild;
diff --git a/protocols/Discord/src/server.cpp b/protocols/Discord/src/server.cpp
index c5655381ac..0c8f31bf5b 100644
--- a/protocols/Discord/src/server.cpp
+++ b/protocols/Discord/src/server.cpp
@@ -110,10 +110,8 @@ void CDiscordProto::OnReceiveHistory(NETLIBHTTPREQUEST *pReply, AsyncHttpRequest
char szMsgId[100];
_i64toa_s(msgid, szMsgId, _countof(szMsgId), 10);
MEVENT hDbEvent = db_event_getById(m_szModuleName, szMsgId);
- if (hDbEvent != 0) {
- if (!pUser->bSkipHistory)
- bSucceeded = 0 == db_event_edit(pUser->hContact, hDbEvent, &dbei);
- }
+ if (hDbEvent != 0)
+ bSucceeded = 0 == db_event_edit(pUser->hContact, hDbEvent, &dbei);
if (!bSucceeded) {
MEVENT hNew = db_event_add(pUser->hContact, &dbei);