Remove test code
This commit is contained in:
parent
2e96f13d0c
commit
5512d1fab7
@ -639,27 +639,6 @@ define([
|
|||||||
|
|
||||||
// Set the display name (username) in the proxy
|
// Set the display name (username) in the proxy
|
||||||
Store.setDisplayName = function (clientId, value, cb) {
|
Store.setDisplayName = function (clientId, value, cb) {
|
||||||
if (store.mailbox && store.proxy.friends) {
|
|
||||||
// XXX test mailbox, should be removed in prod
|
|
||||||
/*store.mailbox.post('notifications', 'NAME_CHANGED', {
|
|
||||||
old: store.proxy[Constants.displayNameKey],
|
|
||||||
new: value
|
|
||||||
});
|
|
||||||
Object.keys(store.proxy.friends).forEach(function (curve) {
|
|
||||||
var f = store.proxy.friends[curve];
|
|
||||||
if (!f.notifications) { return; }
|
|
||||||
store.mailbox.sendTo('NAME_CHANGED', {
|
|
||||||
old: store.proxy[Constants.displayNameKey],
|
|
||||||
new: value
|
|
||||||
}, {
|
|
||||||
channel: f.notifications,
|
|
||||||
curvePublic: curve
|
|
||||||
}, function (obj) {
|
|
||||||
if (obj && obj.error) { return void console.error(obj.error); }
|
|
||||||
console.log('notif sent to '+f);
|
|
||||||
});
|
|
||||||
});*/
|
|
||||||
}
|
|
||||||
if (store.modules['profile']) {
|
if (store.modules['profile']) {
|
||||||
store.modules['profile'].setName(value);
|
store.modules['profile'].setName(value);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -10,7 +10,6 @@ define([
|
|||||||
|
|
||||||
var TYPES = [
|
var TYPES = [
|
||||||
'notifications',
|
'notifications',
|
||||||
'test'
|
|
||||||
];
|
];
|
||||||
var BLOCKING_TYPES = [
|
var BLOCKING_TYPES = [
|
||||||
];
|
];
|
||||||
@ -177,13 +176,6 @@ proxy.mailboxes = {
|
|||||||
var keys = getMyKeys(ctx);
|
var keys = getMyKeys(ctx);
|
||||||
if (!keys) { return void console.error("missing asymmetric encryption keys"); }
|
if (!keys) { return void console.error("missing asymmetric encryption keys"); }
|
||||||
var crypto = Crypto.Mailbox.createEncryptor(keys);
|
var crypto = Crypto.Mailbox.createEncryptor(keys);
|
||||||
// XXX remove 'test'
|
|
||||||
if (type === 'test') {
|
|
||||||
crypto = {
|
|
||||||
encrypt: function (x) { return x; },
|
|
||||||
decrypt: function (x) { return x; }
|
|
||||||
};
|
|
||||||
}
|
|
||||||
var cfg = {
|
var cfg = {
|
||||||
network: ctx.store.network,
|
network: ctx.store.network,
|
||||||
channel: m.channel,
|
channel: m.channel,
|
||||||
|
|||||||
@ -71,20 +71,6 @@ define([
|
|||||||
evTitleChange.fire(title);
|
evTitleChange.fire(title);
|
||||||
if (titleUpdated) {
|
if (titleUpdated) {
|
||||||
titleUpdated(undefined, title);
|
titleUpdated(undefined, title);
|
||||||
// XXX Test notifications from inner
|
|
||||||
var users = metadataMgr.getMetadata().users;
|
|
||||||
var me = metadataMgr.getNetfluxId();
|
|
||||||
Object.keys(users).forEach(function (netfluxId) {
|
|
||||||
if (netfluxId === me) { return; }
|
|
||||||
var user = users[netfluxId];
|
|
||||||
if (!user.curvePublic || !user.notifications) { return; }
|
|
||||||
Common.mailbox.sendTo("TEST_NOTIF_TITLE", {
|
|
||||||
new_title: title
|
|
||||||
}, {
|
|
||||||
channel: user.notifications,
|
|
||||||
curvePublic: user.curvePublic
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user