summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2022-02-20 17:23:52 +0300
committerGeorge Hazan <ghazan@miranda.im>2022-02-20 17:23:52 +0300
commitfc061c08605be248f487ecd156c146d00f42076a (patch)
tree167f401450e81befe07b08e4ef0ac8d8aa727a7e
parente919cfd6e9891c0f15b0550a2936cc278a8ab235 (diff)
Jabber: support for description field in the incoming OOB file transfers
-rwxr-xr-xprotocols/JabberG/src/jabber_thread.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/protocols/JabberG/src/jabber_thread.cpp b/protocols/JabberG/src/jabber_thread.cpp
index 5f26bc929e..862db55b30 100755
--- a/protocols/JabberG/src/jabber_thread.cpp
+++ b/protocols/JabberG/src/jabber_thread.cpp
@@ -1311,12 +1311,17 @@ void CJabberProto::OnProcessMessage(const TiXmlElement *node, ThreadData *info)
msgTime = JabberIsoToUnixTime(ptszTimeStamp);
}
else if (!mir_strcmp(pszXmlns, JABBER_FEAT_OOB2)) {
- auto *url = XmlGetChildText(xNode, "url");
- if (url != nullptr) {
+ if (auto *url = XmlGetChildText(xNode, "url")) {
if (!szMessage.IsEmpty())
szMessage.Append("\r\n");
szMessage.Append(url);
}
+
+ if (auto *descr = XmlGetChildText(xNode, "description")) {
+ if (!szMessage.IsEmpty())
+ szMessage.Append("\r\n");
+ szMessage.AppendFormat("%s: %s", TranslateU("Description"), descr);
+ }
}
else if (!mir_strcmp(pszXmlns, JABBER_FEAT_MUC_USER)) {
auto *inviteNode = XmlFirstChild(xNode, "invite");