diff options
author | George Hazan <ghazan@miranda.im> | 2022-06-19 19:46:09 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2022-06-19 19:46:09 +0300 |
commit | 70015001779f02915e2c92cdb74fe5fffb3ca9cf (patch) | |
tree | 049faa00b6e4b0de613db5fff46c2cac0a4e3f58 /protocols/JabberG/src | |
parent | c3967b167c5c5a7aa16ac1f7edceddb5a26b199c (diff) |
Jabber: fix for the correct JABBER_FEAT_UPLOAD version detection
Diffstat (limited to 'protocols/JabberG/src')
-rw-r--r-- | protocols/JabberG/src/jabber_ft.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/protocols/JabberG/src/jabber_ft.cpp b/protocols/JabberG/src/jabber_ft.cpp index 55002d6f59..e0f17beb94 100644 --- a/protocols/JabberG/src/jabber_ft.cpp +++ b/protocols/JabberG/src/jabber_ft.cpp @@ -645,9 +645,11 @@ LBL_Fail: if (auto *slotNode = XmlFirstChild(iqNode, "slot")) {
if (auto *putNode = XmlFirstChild(slotNode, "put")) {
const char *szXmlns = slotNode->Attribute("xmlns"), *szUrl = nullptr;
+ uint8_t version = 0;
if (!mir_strcmp(szXmlns, JABBER_FEAT_UPLOAD)) {
szUrl = putNode->GetText();
debugLogA("%s: setting url to %s", szXmlns, szUrl);
+ version = 1;
}
else if (!mir_strcmp(szXmlns, JABBER_FEAT_UPLOAD0)) {
szUrl = putNode->Attribute("url");
@@ -709,7 +711,7 @@ LBL_Fail: // this parameter is optional, if not specified we simply use upload URL
CMStringA szMessage;
- if (auto *szGetUrl = XmlGetAttr(XmlFirstChild(slotNode, "get"), "url"))
+ if (auto *szGetUrl = version ? XmlGetChildText(slotNode, "get") : XmlGetAttr(XmlFirstChild(slotNode, "get"), "url"))
szMessage = szGetUrl;
else
szMessage = szUrl;
|