diff options
-rw-r--r-- | plugins/Scriver/src/globals.cpp | 5 | ||||
-rw-r--r-- | plugins/Scriver/src/msgutils.cpp | 1 | ||||
-rw-r--r-- | plugins/Scriver/src/sendqueue.h | 1 | ||||
-rw-r--r-- | plugins/TabSRMM/src/sendqueue.cpp | 5 | ||||
-rw-r--r-- | src/core/stdmsg/src/cmdlist.cpp | 5 |
5 files changed, 17 insertions, 0 deletions
diff --git a/plugins/Scriver/src/globals.cpp b/plugins/Scriver/src/globals.cpp index 6ec8c203bd..406d85b751 100644 --- a/plugins/Scriver/src/globals.cpp +++ b/plugins/Scriver/src/globals.cpp @@ -123,6 +123,7 @@ static int ackevent(WPARAM, LPARAM lParam) return 0;
}
+ char buf[100];
hContact = (db_mc_isMeta(hContact)) ? db_mc_getSrmmSub(item->hContact) : item->hContact;
DBEVENTINFO dbei = {};
@@ -133,6 +134,10 @@ static int ackevent(WPARAM, LPARAM lParam) dbei.cbBlob = (int)mir_strlen(item->sendBuffer) + 1;
dbei.pBlob = item->sendBuffer;
dbei.szId = (char *)pAck->lParam;
+ if (item->hReplyEvent) {
+ itoa(item->hReplyEvent, buf, 10);
+ dbei.szReplyId = buf;
+ }
MessageWindowEvent evt = { item->hSendId, hContact, &dbei };
NotifyEventHooks(g_chatApi.hevPreCreate, 0, (LPARAM)&evt);
diff --git a/plugins/Scriver/src/msgutils.cpp b/plugins/Scriver/src/msgutils.cpp index 9167a4f3dd..5bfc286581 100644 --- a/plugins/Scriver/src/msgutils.cpp +++ b/plugins/Scriver/src/msgutils.cpp @@ -260,6 +260,7 @@ void CMsgDialog::MessageSend(const SendQueue::Item &msi) item->hContact = m_hContact; item->proto = mir_strdup(m_szProto); item->flags = msi.flags; + item->hReplyEvent = m_hQuoteEvent; item->sendBufferSize = msi.sendBufferSize; item->sendBuffer = mir_strndup(msi.sendBuffer, msi.sendBufferSize); SendQueue::SendItem(item); diff --git a/plugins/Scriver/src/sendqueue.h b/plugins/Scriver/src/sendqueue.h index 0fc3658678..a99088628f 100644 --- a/plugins/Scriver/src/sendqueue.h +++ b/plugins/Scriver/src/sendqueue.h @@ -36,6 +36,7 @@ namespace SendQueue CMsgDialog *pDlg;
MCONTACT hContact;
+ MEVENT hReplyEvent;
char *proto;
int hSendId;
int timeout;
diff --git a/plugins/TabSRMM/src/sendqueue.cpp b/plugins/TabSRMM/src/sendqueue.cpp index fe4d158e73..8bb84faa2c 100644 --- a/plugins/TabSRMM/src/sendqueue.cpp +++ b/plugins/TabSRMM/src/sendqueue.cpp @@ -457,6 +457,7 @@ int SendQueue::ackMessage(CMsgDialog *dat, WPARAM wParam, LPARAM lParam) return 0;
}
+ char buf[100];
DBEVENTINFO dbei = {};
dbei.eventType = EVENTTYPE_MESSAGE;
dbei.flags = DBEF_SENT | DBEF_UTF;
@@ -475,6 +476,10 @@ int SendQueue::ackMessage(CMsgDialog *dat, WPARAM wParam, LPARAM lParam) dbei.flags |= DBEF_RTL;
dbei.pBlob = job.szSendBuffer;
dbei.szId = (char *)ack->lParam;
+ if (job.hEvent) {
+ itoa(job.hEvent, buf, 10);
+ dbei.szReplyId = buf;
+ }
MessageWindowEvent evt = { job.iSendId, job.hContact, &dbei };
NotifyEventHooks(g_chatApi.hevPreCreate, 0, (LPARAM)&evt);
diff --git a/src/core/stdmsg/src/cmdlist.cpp b/src/core/stdmsg/src/cmdlist.cpp index ab90a67a1f..c43a699858 100644 --- a/src/core/stdmsg/src/cmdlist.cpp +++ b/src/core/stdmsg/src/cmdlist.cpp @@ -89,6 +89,7 @@ void msgQueue_processack(MCONTACT hContact, int id, BOOL success, LPARAM lParam) return;
}
+ char buf[100];
DBEVENTINFO dbei = {};
dbei.eventType = EVENTTYPE_MESSAGE;
dbei.flags = DBEF_SENT | DBEF_UTF | (p->flags & DBEF_RTL ? DBEF_RTL : 0);
@@ -97,6 +98,10 @@ void msgQueue_processack(MCONTACT hContact, int id, BOOL success, LPARAM lParam) dbei.cbBlob = (uint32_t)(mir_strlen(p->szMsg) + 1);
dbei.pBlob = p->szMsg;
dbei.szId = (char *)lParam;
+ if (p->hEvent) {
+ itoa(p->hEvent, buf, 10);
+ dbei.szReplyId = buf;
+ }
MessageWindowEvent evt = { id, hContact, &dbei };
NotifyEventHooks(g_chatApi.hevPreCreate, 0, (LPARAM)&evt);
|