From 99718e58c342b757ac30d89379d6ef399e1ce4c9 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 20 Oct 2019 21:09:36 +0300 Subject: fixes #2098 (Jabber: add HTTP File upload url to message log instead of local address) --- protocols/JabberG/src/jabber_ft.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'protocols/JabberG/src') diff --git a/protocols/JabberG/src/jabber_ft.cpp b/protocols/JabberG/src/jabber_ft.cpp index a2a11e259f..a543800df8 100644 --- a/protocols/JabberG/src/jabber_ft.cpp +++ b/protocols/JabberG/src/jabber_ft.cpp @@ -620,10 +620,16 @@ LBL_Fail: // this parameter is optional, if not specified we simply use upload URL auto *szGetUrl = XmlGetAttr(XmlFirstChild(slotNode, "get"), "url"); - if (szGetUrl) - SendMsg(ft->std.hContact, 0, szGetUrl); - else - SendMsg(ft->std.hContact, 0, szUrl); + if (szGetUrl == nullptr) + szGetUrl = szUrl; + + if (ProtoChainSend(ft->std.hContact, PSS_MESSAGE, 0, (LPARAM)szGetUrl) != -1) { + PROTORECVEVENT recv = {}; + recv.flags = PREF_CREATEREAD; + recv.szMessage = (char*)szGetUrl; + recv.timestamp = time(0); + ProtoChainRecvMsg(ft->std.hContact, &recv); + } ProtoBroadcastAck(ft->std.hContact, ACKTYPE_FILE, ACKRESULT_SUCCESS, ft, 0); delete ft; -- cgit v1.2.3