diff options
author | George Hazan <ghazan@miranda.im> | 2023-01-27 19:48:42 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2023-01-27 19:48:42 +0300 |
commit | 899221e2d058f5afe30bb2ecdbf168c8ad3c15a6 (patch) | |
tree | ea2346678575a4fc5fdd9575b6a9174bd30c70dc /plugins/PasteIt/src | |
parent | c736d08681747a9453bd4c266f6dd54d8cbd79eb (diff) |
Group chats: all old APIs with lookup by module+session removed
Diffstat (limited to 'plugins/PasteIt/src')
-rw-r--r-- | plugins/PasteIt/src/PasteIt.cpp | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/plugins/PasteIt/src/PasteIt.cpp b/plugins/PasteIt/src/PasteIt.cpp index b7fb63df7d..ee1393169e 100644 --- a/plugins/PasteIt/src/PasteIt.cpp +++ b/plugins/PasteIt/src/PasteIt.cpp @@ -122,28 +122,7 @@ static void PasteIt(MCONTACT hContact, int mode) db_event_add(hContact, &dbei);
ProtoChainSend(hContact, PSS_MESSAGE, 0, (LPARAM)pasteToWeb->szFileLink);
}
- else {
- // PSS_MESSAGE is not compatible with chat rooms
- // there are no simple method to send text to all users
- // in chat room.
- // Next step is to get all protocol sessions and find
- // one with correct hContact
- int cnt = g_chatApi.SM_GetCount(szProto);
- for (int i = 0; i < cnt; i++) {
- GC_INFO gci = {};
- gci.iItem = i;
- gci.pszModule = szProto;
- gci.Flags = GCF_BYINDEX | GCF_HCONTACT | GCF_ID;
- Chat_GetInfo(&gci);
- if (gci.hContact == hContact) {
- // In this place session was finded, gci.pszID contains
- // session ID, but it is in unicode or ascii format,
- // depends on protocol wersion
- Chat_SendUserMessage(szProto, gci.pszID, _A2T(pasteToWeb->szFileLink));
- break;
- }
- }
- }
+ else Chat_SendUserMessage(szProto, _A2T(pasteToWeb->szFileLink));
// Send message to focus window
CallServiceSync(MS_MSG_SENDMESSAGE, hContact, 0);
|