diff options
author | George Hazan <george.hazan@gmail.com> | 2024-01-24 16:08:11 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2024-01-24 16:08:11 +0300 |
commit | cf30319150edb0d5b49b05078817725c629320ba (patch) | |
tree | 8d3fe712d532a4f2b3513fc316fd25fe0ba74806 /src/mir_app | |
parent | 660b4e02d4bef4f7ac953689ce00d727bf9bacbd (diff) |
PS_EMPTY_SRV_HISTORY implementation for Telegram
Diffstat (limited to 'src/mir_app')
-rw-r--r-- | src/mir_app/src/clui.cpp | 4 | ||||
-rw-r--r-- | src/mir_app/src/netlib_websocket.cpp | 2 | ||||
-rw-r--r-- | src/mir_app/src/srmm_main.cpp | 7 |
3 files changed, 4 insertions, 9 deletions
diff --git a/src/mir_app/src/clui.cpp b/src/mir_app/src/clui.cpp index f01ed76b7c..7af3cbcdf3 100644 --- a/src/mir_app/src/clui.cpp +++ b/src/mir_app/src/clui.cpp @@ -218,7 +218,7 @@ static INT_PTR MenuItem_DeleteContact(WPARAM hContact, LPARAM lParam) options |= CDF_FOR_EVERYONE;
if (dlg.bDelHistory)
- CallContactService(hContact, PS_EMPTY_SRV_HISTORY, CDF_DEL_HISTORY | (dlg.bForEveryone ? CDF_FOR_EVERYONE : 0));
+ CallContactService(hContact, PS_EMPTY_SRV_HISTORY, hContact, options);
int status = Proto_GetStatus(dlg.szProto);
if (status == ID_STATUS_OFFLINE || IsStatusConnecting(status)) {
@@ -228,7 +228,7 @@ static INT_PTR MenuItem_DeleteContact(WPARAM hContact, LPARAM lParam) TranslateT("This contact is on an instant messaging system which stores its contact list on a central server. The contact will be removed from the server and from your contact list when you next connect to that network."),
TranslateT("Delete contact"), MB_ICONINFORMATION | MB_OK);
}
- else db_delete_contact(hContact, options);
+ else db_delete_contact(hContact);
return 0;
}
diff --git a/src/mir_app/src/netlib_websocket.cpp b/src/mir_app/src/netlib_websocket.cpp index 9117980074..9ce6f72be9 100644 --- a/src/mir_app/src/netlib_websocket.cpp +++ b/src/mir_app/src/netlib_websocket.cpp @@ -150,7 +150,7 @@ static void WebSocket_Send(HNETLIBCONN nlc, const void *pData, int64_t dataLen, memcpy(sendBuf, header, cbLen);
if (dataLen) {
memcpy(sendBuf.get() + cbLen, pData, dataLen);
- for (size_t i = 0; i < dataLen; i++)
+ for (int i = 0; i < dataLen; i++)
sendBuf[i + cbLen] ^= arMask[i & 3];
}
Netlib_Send(nlc, sendBuf, int(dataLen + cbLen), MSG_NODUMP);
diff --git a/src/mir_app/src/srmm_main.cpp b/src/mir_app/src/srmm_main.cpp index 5050ebec5d..b2ebc81c7a 100644 --- a/src/mir_app/src/srmm_main.cpp +++ b/src/mir_app/src/srmm_main.cpp @@ -22,7 +22,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. HCURSOR g_hCurHyperlinkHand; HANDLE hHookIconsChanged, hHookIconPressedEvt, hHookSrmmEvent; -static HANDLE hHookEmptyHistory; static HGENMENU hmiEmpty; void LoadSrmmToolbarModule(); @@ -89,9 +88,6 @@ public: static INT_PTR svcEmptyHistory(WPARAM hContact, LPARAM lParam) { - if (NotifyEventHooks(hHookEmptyHistory)) - return 2; - CEmptyHistoryDlg dlg(hContact); if (lParam == 0) if (dlg.DoModal() != IDOK) @@ -106,7 +102,7 @@ static INT_PTR svcEmptyHistory(WPARAM hContact, LPARAM lParam) Chat_EmptyHistory(si); if (dlg.bDelHistory) - CallContactService(hContact, PS_EMPTY_SRV_HISTORY, CDF_DEL_HISTORY | (dlg.bForEveryone ? CDF_FOR_EVERYONE : 0)); + CallContactService(hContact, PS_EMPTY_SRV_HISTORY, hContact, CDF_DEL_HISTORY | (dlg.bForEveryone ? CDF_FOR_EVERYONE : 0)); return 0; } @@ -149,7 +145,6 @@ int LoadSrmmModule() LoadSrmmToolbarModule(); CreateServiceFunction(MS_HISTORY_EMPTY, svcEmptyHistory); - hHookEmptyHistory = CreateHookableEvent(ME_HISTORY_EMPTY); hHookSrmmEvent = CreateHookableEvent(ME_MSG_WINDOWEVENT); hHookIconsChanged = CreateHookableEvent(ME_MSG_ICONSCHANGED); |