Channel conf UI WIP

This commit is contained in:
John Livingston
2023-09-22 16:30:12 +02:00
parent af115e984b
commit 562073fc09
6 changed files with 204 additions and 68 deletions

View File

@ -103,6 +103,21 @@ class BotConfiguration {
return singleton
}
/**
* Get the current room conf content.
* @param roomJIDParam room JID (local or full)
* @returns the room conf, or null if does not exist
*/
public async getRoom (roomJIDParam: string): Promise<ChannelCommonRoomConf | null> {
const roomJID = this._canonicJID(roomJIDParam)
if (!roomJID) {
this.logger.error('Invalid room JID')
return null
}
const conf = await this._getRoomConf(roomJID)
return conf
}
/**
* Update the bot configuration for a given room.
* @param roomJIDParam Room full or local JID