diff options
author | George Hazan <ghazan@miranda.im> | 2019-10-20 21:09:36 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-10-20 21:09:43 +0300 |
commit | 99718e58c342b757ac30d89379d6ef399e1ce4c9 (patch) | |
tree | 727951e6e02543f586b0ae6d4fb8e5507f665f97 /protocols/JabberG | |
parent | c0ba534a3a42ef1530d2fa5870c897b50044aab0 (diff) |
fixes #2098 (Jabber: add HTTP File upload url to message log instead of local address)
Diffstat (limited to 'protocols/JabberG')
-rw-r--r-- | protocols/JabberG/src/jabber_ft.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
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;
|