diff options
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/Discord/src/menus.cpp | 1 | ||||
-rw-r--r-- | protocols/Discord/src/server.cpp | 6 | ||||
-rw-r--r-- | protocols/Discord/src/version.h | 4 |
3 files changed, 7 insertions, 4 deletions
diff --git a/protocols/Discord/src/menus.cpp b/protocols/Discord/src/menus.cpp index fc3df4d44e..8ebf50613b 100644 --- a/protocols/Discord/src/menus.cpp +++ b/protocols/Discord/src/menus.cpp @@ -82,6 +82,7 @@ INT_PTR CDiscordProto::OnMenuLoadHistory(WPARAM hContact, LPARAM) 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/server.cpp b/protocols/Discord/src/server.cpp index cae684f970..c5655381ac 100644 --- a/protocols/Discord/src/server.cpp +++ b/protocols/Discord/src/server.cpp @@ -106,14 +106,16 @@ void CDiscordProto::OnReceiveHistory(NETLIBHTTPREQUEST *pReply, AsyncHttpRequest dbei.pBlob = (PBYTE)szBody.get(); dbei.cbBlob = (DWORD)mir_strlen(szBody); + bool bSucceeded = false; char szMsgId[100]; _i64toa_s(msgid, szMsgId, _countof(szMsgId), 10); MEVENT hDbEvent = db_event_getById(m_szModuleName, szMsgId); if (hDbEvent != 0) { if (!pUser->bSkipHistory) - db_event_edit(pUser->hContact, hDbEvent, &dbei); + bSucceeded = 0 == db_event_edit(pUser->hContact, hDbEvent, &dbei); } - else { + + if (!bSucceeded) { MEVENT hNew = db_event_add(pUser->hContact, &dbei); if (hNew != 0) db_event_setId(m_szModuleName, hNew, szMsgId); diff --git a/protocols/Discord/src/version.h b/protocols/Discord/src/version.h index 61ad77e877..489805825c 100644 --- a/protocols/Discord/src/version.h +++ b/protocols/Discord/src/version.h @@ -1,7 +1,7 @@ #define __MAJOR_VERSION 0 #define __MINOR_VERSION 6 -#define __RELEASE_NUM 1 -#define __BUILD_NUM 4 +#define __RELEASE_NUM 2 +#define __BUILD_NUM 1 #include <stdver.h> |