From 0cc57dfc1284c3fe4b42fe8d2e22992e278f8e07 Mon Sep 17 00:00:00 2001 From: John Livingston Date: Sat, 1 May 2021 10:30:41 +0200 Subject: [PATCH] Prosody: the first user will not be granted owner rights. --- server/lib/routers/api.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/server/lib/routers/api.ts b/server/lib/routers/api.ts index 98aaafd4..2b7ed81e 100644 --- a/server/lib/routers/api.ts +++ b/server/lib/routers/api.ts @@ -17,7 +17,11 @@ interface RoomDefaults { // moderated: boolean // archiving: boolean } - // affiliations: RoomAffiliation[] + affiliations?: Array<{ + jid: string + affiliation: 'outcast' | 'none' | 'member' | 'admin' | 'owner' + nick?: string + }> } async function initApiRouter (options: RegisterServerOptions): Promise { @@ -43,7 +47,8 @@ async function initApiRouter (options: RegisterServerOptions): Promise { description: '', public: false, subject: video.name - } + }, + affiliations: [] // so that the first user will not be moderator/admin } res.json(roomDefaults) } catch (error) {