From 979a7ee9bea1ec5a9f911cf6ed50a3c6051f055c Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 24 Feb 2020 20:55:50 +0300 Subject: Jabber: inlined image being sent to be displayed in our own history --- protocols/JabberG/src/jabber_ft.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/protocols/JabberG/src/jabber_ft.cpp b/protocols/JabberG/src/jabber_ft.cpp index 2359adcc2f..18dd282611 100644 --- a/protocols/JabberG/src/jabber_ft.cpp +++ b/protocols/JabberG/src/jabber_ft.cpp @@ -746,6 +746,15 @@ bool CJabberProto::FtTryInlineFile(MCONTACT hContact, const wchar_t *pwszFileNam m << XCHILDNS("request", JABBER_FEAT_MESSAGE_RECEIPTS); m << XCHILDNS("markable", JABBER_FEAT_CHAT_MARKERS); m_ThreadInfo->send(m); + + // emulate a message for us + CMStringA szMsg(FORMAT, "[img]%s[/img]", T2Utf(wszFileName).get()); + + PROTORECVEVENT recv = {}; + recv.flags = PREF_CREATEREAD | PREF_SENT; + recv.szMessage = szMsg.GetBuffer(); + recv.timestamp = time(0); + ProtoChainRecvMsg(hContact, &recv); return true; } -- cgit v1.2.3