summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
authorGluzskiy Alexandr <sss@sss.chaoslab.ru>2017-03-22 20:31:32 +0300
committerGluzskiy Alexandr <sss@sss.chaoslab.ru>2017-03-27 20:17:27 +0300
commit780b307ddff495b0a4394d3880b5a3ae7a83f26e (patch)
treed755ff7585b512e5045fe7f1c24644d0af4b1d49 /protocols
parentb3e8f72f17e9787aa5455977dc5eae05ddecb578 (diff)
omemo: working on 4.3
altered features names for compatibility with existing implementations
Diffstat (limited to 'protocols')
-rwxr-xr-xprotocols/JabberG/src/jabber_caps.h2
-rwxr-xr-xprotocols/JabberG/src/jabber_omemo.cpp14
-rwxr-xr-xprotocols/JabberG/src/jabber_thread.cpp2
3 files changed, 9 insertions, 9 deletions
diff --git a/protocols/JabberG/src/jabber_caps.h b/protocols/JabberG/src/jabber_caps.h
index 41d4a11abc..097108c608 100755
--- a/protocols/JabberG/src/jabber_caps.h
+++ b/protocols/JabberG/src/jabber_caps.h
@@ -112,7 +112,7 @@ typedef unsigned __int64 JabberCapsBits;
#define JABBER_CAPS_NEWGPG ((JabberCapsBits)1<<43)
#define JABBER_FEAT_OMEMO L"eu.siacs.conversations.axolotl" //will become "urn:xmpp:omemo:0" once standard get accepted
#define JABBER_CAPS_OMEMO ((JabberCapsBits)1<<46)
-#define JABBER_FEAT_OMEMO_DEVICELIST_NOTIFY JABBER_FEAT_OMEMO L":devicelist+notify"
+#define JABBER_FEAT_OMEMO_DEVICELIST_NOTIFY JABBER_FEAT_OMEMO L".devicelist+notify"
#define JABBER_CAPS_OMEMO_DEVICELIST_NOTIFY ((JabberCapsBits)1<<47)
#define JABBER_CAPS_PLATFORMX86 ((JabberCapsBits)1<<44)
#define JABBER_CAPS_PLATFORMX64 ((JabberCapsBits)1<<45)
diff --git a/protocols/JabberG/src/jabber_omemo.cpp b/protocols/JabberG/src/jabber_omemo.cpp
index de38332f0c..2b80addf46 100755
--- a/protocols/JabberG/src/jabber_omemo.cpp
+++ b/protocols/JabberG/src/jabber_omemo.cpp
@@ -548,11 +548,11 @@ namespace omemo {
iq << XATTR(L"from", proto->m_ThreadInfo->fullJID); //full unstripped jid used here
HXML create_node = iq << XCHILDNS(L"pubsub", L"http://jabber.org/protocol/pubsub") << XCHILD(L"create");
create_node << XATTR(L"node", node_name);
- if(!mir_wstrcmp(node_name, JABBER_FEAT_OMEMO L":devicelist"))
+ if(!mir_wstrcmp(node_name, JABBER_FEAT_OMEMO L".devicelist"))
{
DWORD own_id = omemo::GetOwnDeviceId(proto);
wchar_t attr_val[128];
- mir_snwprintf(attr_val, L"%s:bundles:%d", JABBER_FEAT_OMEMO, own_id);
+ mir_snwprintf(attr_val, L"%s.bundles:%d", JABBER_FEAT_OMEMO, own_id);
pubsub_createnode_impl(attr_val, proto);
}
proto->m_ThreadInfo->send(iq);
@@ -655,7 +655,7 @@ void CJabberProto::OmemoOnIqResultPubsubCreateNode(HXML iqNode, CJabberIqInfo *p
omemo::IqHandlerUserData *data = (omemo::IqHandlerUserData*)pInfo->GetUserData();
- if (!mir_wstrcmp(data->node_name, JABBER_FEAT_OMEMO L":devicelist"))
+ if (!mir_wstrcmp(data->node_name, JABBER_FEAT_OMEMO L".devicelist"))
{ //device list node created
OmemoAnnounceDevice();
}
@@ -663,7 +663,7 @@ void CJabberProto::OmemoOnIqResultPubsubCreateNode(HXML iqNode, CJabberIqInfo *p
{
DWORD own_id = omemo::GetOwnDeviceId(this);
wchar_t attr_val[128];
- mir_snwprintf(attr_val, L"%s:bundles:%d", JABBER_FEAT_OMEMO, own_id);
+ mir_snwprintf(attr_val, L"%s.bundles:%d", JABBER_FEAT_OMEMO, own_id);
if (!mir_wstrcmp(data->node_name, attr_val))
{ //device bundle node created
OmemoSendBundle();
@@ -763,7 +763,7 @@ void CJabberProto::OmemoAnnounceDevice()
wchar_t szBareJid[JABBER_MAX_JID_LEN];
XmlNodeIq iq(L"set", SerialNext());
iq << XATTR(L"from", JabberStripJid(m_ThreadInfo->fullJID, szBareJid, _countof_portable(szBareJid)));
- HXML publish_node = iq << XCHILDNS(L"pubsub", L"http://jabber.org/protocol/pubsub") << XCHILD(L"publish") << XATTR(L"node", JABBER_FEAT_OMEMO L":devicelist");
+ HXML publish_node = iq << XCHILDNS(L"pubsub", L"http://jabber.org/protocol/pubsub") << XCHILD(L"publish") << XATTR(L"node", JABBER_FEAT_OMEMO L".devicelist");
HXML list_node = publish_node << XCHILDNS(L"item") << XCHILDNS(L"list", JABBER_FEAT_OMEMO);
for (int i = 0; ; ++i) {
@@ -794,7 +794,7 @@ void CJabberProto::OmemoSendBundle()
HXML publish_node = iq << XCHILDNS(L"pubsub", L"http://jabber.org/protocol/pubsub") << XCHILD(L"publish");
{
wchar_t attr_val[128];
- mir_snwprintf(attr_val, L"%s:bundles:%d", JABBER_FEAT_OMEMO, own_id);
+ mir_snwprintf(attr_val, L"%s.bundles:%d", JABBER_FEAT_OMEMO, own_id);
publish_node << XATTR(L"node", attr_val);
}
HXML bundle_node = publish_node << XCHILD(L"item") << XCHILDNS(L"bundle", JABBER_FEAT_OMEMO);
@@ -829,5 +829,5 @@ void CJabberProto::OmemoSendBundle()
void CJabberProto::OmemoCreateNodes()
{
- omemo::pubsub_createnode(JABBER_FEAT_OMEMO L":devicelist", this);
+ omemo::pubsub_createnode(JABBER_FEAT_OMEMO L".devicelist", this);
}
diff --git a/protocols/JabberG/src/jabber_thread.cpp b/protocols/JabberG/src/jabber_thread.cpp
index 1fe2517167..f9ece29019 100755
--- a/protocols/JabberG/src/jabber_thread.cpp
+++ b/protocols/JabberG/src/jabber_thread.cpp
@@ -951,7 +951,7 @@ void CJabberProto::OnProcessPubsubEvent(HXML node)
HXML itemsNode;
if (m_options.UseOMEMO)
{
- itemsNode = XmlGetChildByTag(eventNode, L"items", L"node", JABBER_FEAT_OMEMO L":devicelist");
+ itemsNode = XmlGetChildByTag(eventNode, L"items", L"node", JABBER_FEAT_OMEMO L".devicelist");
if (itemsNode)
{
OmemoHandleDeviceList(itemsNode);