diff options
| author | George Hazan <george.hazan@gmail.com> | 2023-12-03 16:32:28 +0300 |
|---|---|---|
| committer | George Hazan <george.hazan@gmail.com> | 2023-12-03 16:32:28 +0300 |
| commit | 156262f08922cf65d9aff58257d623f7eab70f2f (patch) | |
| tree | d91dcef2d51487bb32c8a218ecc816ed5115e265 /src/core/stdmsg | |
| parent | dd1aac53b981fc57b3fc23ad25bdfd3ce8adc15f (diff) | |
SRMM: sending quoted event as PSS_MESSAGE parameter
Diffstat (limited to 'src/core/stdmsg')
| -rw-r--r-- | src/core/stdmsg/src/cmdlist.cpp | 3 | ||||
| -rw-r--r-- | src/core/stdmsg/src/cmdlist.h | 3 | ||||
| -rw-r--r-- | src/core/stdmsg/src/msgdialog.cpp | 2 | ||||
| -rw-r--r-- | src/core/stdmsg/src/msgs.cpp | 6 | ||||
| -rw-r--r-- | src/core/stdmsg/src/msgs.h | 2 | ||||
| -rw-r--r-- | src/core/stdmsg/src/msgtimedout.cpp | 2 |
6 files changed, 10 insertions, 8 deletions
diff --git a/src/core/stdmsg/src/cmdlist.cpp b/src/core/stdmsg/src/cmdlist.cpp index 1ace5b0545..356d7ad6f0 100644 --- a/src/core/stdmsg/src/cmdlist.cpp +++ b/src/core/stdmsg/src/cmdlist.cpp @@ -44,10 +44,11 @@ static VOID CALLBACK MsgTimer(HWND, UINT, UINT_PTR, DWORD dwTime) MessageFailureProcess(it, TranslateT("The message send timed out."));
}
-void msgQueue_add(MCONTACT hContact, int id, char *szMsg, int flags)
+void msgQueue_add(MCONTACT hContact, MEVENT hEvent, int id, char *szMsg, int flags)
{
TMsgQueue *item = (TMsgQueue*)mir_alloc(sizeof(TMsgQueue));
item->hContact = hContact;
+ item->hEvent = hEvent;
item->id = id;
item->szMsg = szMsg;
item->flags = flags;
diff --git a/src/core/stdmsg/src/cmdlist.h b/src/core/stdmsg/src/cmdlist.h index fda5562689..63b29a72f4 100644 --- a/src/core/stdmsg/src/cmdlist.h +++ b/src/core/stdmsg/src/cmdlist.h @@ -26,12 +26,13 @@ struct TMsgQueue {
int id;
MCONTACT hContact;
+ MEVENT hEvent;
char *szMsg;
int flags;
unsigned ts;
};
-void msgQueue_add(MCONTACT hContact, int id, char *szMsg, int flags);
+void msgQueue_add(MCONTACT hContact, MEVENT hEvent, int id, char *szMsg, int flags);
void msgQueue_processack(MCONTACT hContact, int id, BOOL success, LPARAM szErr);
void msgQueue_destroy(void);
diff --git a/src/core/stdmsg/src/msgdialog.cpp b/src/core/stdmsg/src/msgdialog.cpp index c9caf7fe33..64436c9045 100644 --- a/src/core/stdmsg/src/msgdialog.cpp +++ b/src/core/stdmsg/src/msgdialog.cpp @@ -338,7 +338,7 @@ void CMsgDialog::onClick_Ok(CCtrlButton *pButton) if (!temp[0])
return;
- int sendId = SendMessageDirect(rtrimw(temp), m_hContact);
+ int sendId = SendMessageDirect(m_hContact, m_hQuoteEvent, rtrimw(temp));
if (sendId) {
m_cmdList.insert(temp.detach());
m_cmdListInd = -1;
diff --git a/src/core/stdmsg/src/msgs.cpp b/src/core/stdmsg/src/msgs.cpp index fcf23c51d8..74cf050431 100644 --- a/src/core/stdmsg/src/msgs.cpp +++ b/src/core/stdmsg/src/msgs.cpp @@ -29,7 +29,7 @@ int OnCheckPlugins(WPARAM, LPARAM); /////////////////////////////////////////////////////////////////////////////////////////
-int SendMessageDirect(const wchar_t *szMsg, MCONTACT hContact)
+int SendMessageDirect(MCONTACT hContact, MEVENT hEvent, const wchar_t *szMsg)
{
if (hContact == 0)
return 0;
@@ -45,8 +45,8 @@ int SendMessageDirect(const wchar_t *szMsg, MCONTACT hContact) if (db_mc_isMeta(hContact))
hContact = db_mc_getSrmmSub(hContact);
- int sendId = ProtoChainSend(hContact, PSS_MESSAGE, flags, (LPARAM)sendBuffer);
- msgQueue_add(hContact, sendId, sendBuffer.detach(), flags);
+ int sendId = ProtoChainSend(hContact, PSS_MESSAGE, hEvent, (LPARAM)sendBuffer);
+ msgQueue_add(hContact, hEvent, sendId, sendBuffer.detach(), flags);
return sendId;
}
diff --git a/src/core/stdmsg/src/msgs.h b/src/core/stdmsg/src/msgs.h index 5e40d57e0a..180bd49917 100644 --- a/src/core/stdmsg/src/msgs.h +++ b/src/core/stdmsg/src/msgs.h @@ -157,7 +157,7 @@ extern LIST<CMsgDialog> g_arDialogs; /////////////////////////////////////////////////////////////////////////////////////////
bool DbEventIsShown(const DB::EventInfo &dbei);
-int SendMessageDirect(const wchar_t *szMsg, MCONTACT hContact);
+int SendMessageDirect(MCONTACT hContact, MEVENT hEvent, const wchar_t *szMsg);
INT_PTR SendMessageCmd(MCONTACT hContact, wchar_t *msg);
void LoadMsgLogIcons(void);
diff --git a/src/core/stdmsg/src/msgtimedout.cpp b/src/core/stdmsg/src/msgtimedout.cpp index 828924580e..74167bf0cb 100644 --- a/src/core/stdmsg/src/msgtimedout.cpp +++ b/src/core/stdmsg/src/msgtimedout.cpp @@ -61,7 +61,7 @@ public: bool OnApply() override
{
- SendMessageDirect(ptrW(mir_utf8decodeW(m_item->szMsg)), m_item->hContact);
+ SendMessageDirect(m_item->hContact, m_item->hEvent, ptrW(mir_utf8decodeW(m_item->szMsg)));
return true;
}
|
