summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);