diff options
author | George Hazan <ghazan@miranda.im> | 2020-02-24 20:55:50 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2020-02-24 20:55:50 +0300 |
commit | 979a7ee9bea1ec5a9f911cf6ed50a3c6051f055c (patch) | |
tree | fdfb69bd6338a9e2ab23289bd28ea5bfe76042f4 /protocols/JabberG | |
parent | 8040f360a7390137a24f78870da4513fb6c12d99 (diff) |
Jabber: inlined image being sent to be displayed in our own history
Diffstat (limited to 'protocols/JabberG')
-rw-r--r-- | protocols/JabberG/src/jabber_ft.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
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;
}
|