From 0de739525869b6582e8466135a606c68e476cf3d Mon Sep 17 00:00:00 2001 From: yflory Date: Mon, 23 Sep 2019 17:01:30 +0200 Subject: [PATCH] Fix metadata not updated when creating a team --- www/common/outer/team.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/www/common/outer/team.js b/www/common/outer/team.js index 8243fb800..db150bf04 100644 --- a/www/common/outer/team.js +++ b/www/common/outer/team.js @@ -449,6 +449,15 @@ define([ return void cb({error: 'CHAT_INIT_ERROR'}); }; cpNf2 = CpNetflux.start(chatCfg); + }).nThen(function (waitFor) { + roster.metadata({ + name: data.name + }, waitFor(function (err) { + if (err) { + waitFor.abort(); + return void cb({error: 'ROSTER_INIT_ERROR'}); + } + })); }).nThen(function () { var lm = Listmap.create(config); var proxy = lm.proxy; @@ -486,6 +495,7 @@ define([ proxy.drive = {}; onReady(ctx, id, lm, roster, keys, cId, function () { + ctx.updateMetadata(); cb(); }); }).on('error', function (info) {