Store image hash from presence on the occupant
This commit is contained in:
parent
8c3f379d82
commit
7660a27682
@ -48,6 +48,7 @@
|
||||
Strophe.addNamespace('SID', 'urn:xmpp:sid:0');
|
||||
Strophe.addNamespace('SPOILER', 'urn:xmpp:spoiler:0');
|
||||
Strophe.addNamespace('XFORM', 'jabber:x:data');
|
||||
Strophe.addNamespace('VCARDUPDATE', 'vcard-temp:x:update');
|
||||
|
||||
// Use Mustache style syntax for variable interpolation
|
||||
/* Configuration of Lodash templates (this config is distinct to the
|
||||
|
@ -785,9 +785,9 @@
|
||||
parsePresence (pres) {
|
||||
const id = Strophe.getResourceFromJid(pres.getAttribute("from"));
|
||||
const data = {
|
||||
nick: id,
|
||||
type: pres.getAttribute("type"),
|
||||
states: []
|
||||
'nick': id,
|
||||
'type': pres.getAttribute("type"),
|
||||
'states': []
|
||||
};
|
||||
_.each(pres.childNodes, function (child) {
|
||||
switch (child.nodeName) {
|
||||
@ -813,6 +813,8 @@
|
||||
}
|
||||
}
|
||||
});
|
||||
} else if (child.getAttribute("xmlns") === Strophe.NS.VCARDUPDATE) {
|
||||
data.image_hash = _.get(child.querySelector('photo'), 'textContent');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -19,7 +19,7 @@
|
||||
}(this, function (converse, bootstrap, tpl_toolbar_otr, otr) {
|
||||
"use strict";
|
||||
|
||||
const { Strophe, utils, b64_sha1, _ } = converse.env;
|
||||
const { Strophe, utils, _ } = converse.env;
|
||||
|
||||
const HAS_CSPRNG = _.isUndefined(window.crypto) ? false : (
|
||||
_.isFunction(window.crypto.randomBytes) ||
|
||||
|
Loading…
Reference in New Issue
Block a user