summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--protocols/ICQ-WIM/src/proto.cpp14
-rw-r--r--protocols/ICQ-WIM/src/proto.h1
2 files changed, 15 insertions, 0 deletions
diff --git a/protocols/ICQ-WIM/src/proto.cpp b/protocols/ICQ-WIM/src/proto.cpp
index e4048a7211..ffefe1846c 100644
--- a/protocols/ICQ-WIM/src/proto.cpp
+++ b/protocols/ICQ-WIM/src/proto.cpp
@@ -71,6 +71,8 @@ CIcqProto::CIcqProto(const char *aProtoName, const wchar_t *aUserName) :
CreateProtoService(PS_SETMYAVATAR, &CIcqProto::SetAvatar);
CreateProtoService(PS_MENU_LOADHISTORY, &CIcqProto::SvcLoadHistory);
+ CreateProtoService(PS_EMPTY_SRV_HISTORY, &CIcqProto::SvcEmptyHistory);
+
CreateProtoService(PS_GETUNREADEMAILCOUNT, &CIcqProto::SvcGetEmailCount);
CreateProtoService(PS_GOTO_INBOX, &CIcqProto::SvcGotoInbox);
@@ -311,6 +313,18 @@ INT_PTR CIcqProto::SvcLoadHistory(WPARAM hContact, LPARAM)
return 0;
}
+INT_PTR CIcqProto::SvcEmptyHistory(WPARAM hContact, LPARAM)
+{
+ auto *pReq = new AsyncRapiRequest(this, "delHistory");
+ #ifndef _DEBUG
+ pReq->flags |= NLHRF_NODUMPSEND;
+ #endif
+ pReq->hContact = hContact;
+ pReq->params << WCHAR_PARAM("sn", GetUserId(hContact)) << INT64_PARAM("uptoMsgId", getId(hContact, DB_KEY_LASTMSGID));
+ Push(pReq);
+ return 0;
+}
+
/////////////////////////////////////////////////////////////////////////////////////////
void CIcqProto::OnBuildProtoMenu()
diff --git a/protocols/ICQ-WIM/src/proto.h b/protocols/ICQ-WIM/src/proto.h
index d5d1720d85..eb363bffd5 100644
--- a/protocols/ICQ-WIM/src/proto.h
+++ b/protocols/ICQ-WIM/src/proto.h
@@ -411,6 +411,7 @@ class CIcqProto : public PROTO<CIcqProto>
INT_PTR __cdecl UploadGroups(WPARAM, LPARAM);
INT_PTR __cdecl SvcLoadHistory(WPARAM, LPARAM);
+ INT_PTR __cdecl SvcEmptyHistory(WPARAM, LPARAM);
////////////////////////////////////////////////////////////////////////////////////////
// events