Accept and decline ownership offers

This commit is contained in:
yflory
2019-08-30 17:36:27 +02:00
parent c76363e765
commit e131661673
7 changed files with 142 additions and 37 deletions

View File

@@ -1397,6 +1397,7 @@ define([
cb(channel.data || {});
};
Store.setPadMetadata = function (clientId, data, cb) {
console.log(data);
if (!data.channel) { return void cb({ error: 'ENOTFOUND'}); }
if (!data.command) { return void cb({ error: 'EINVAL' }); }
store.rpc.setMetadata(data, function (err, res) {

View File

@@ -264,6 +264,7 @@ define([
handlers['ADD_OWNER'] = function (ctx, box, data, cb) {
var msg = data.msg;
var content = msg.content;
console.log(msg);
if (msg.author !== content.user.curvePublic) { return void cb(true); }
if (!content.href || !content.title || !content.channel) {