This commit is contained in:
John Livingston 2021-12-08 16:59:37 +01:00
parent 605b306dc8
commit ae593c26f1
No known key found for this signature in database
GPG Key ID: B17B5640CE66CDBC

View File

@ -68,6 +68,7 @@ export class BotHandlerDemo extends BotHandler {
if (!room.isOnline()) { return }
// checking if there is someone to listen...
const onlineUserCount = this.room.onlineUserCount()
logger.debug(`Online user count in room: ${onlineUserCount}`)
if (onlineUserCount < 2) { return }
const cpt = this.randomCount++
logger.info(`Emitting the random message number ${cpt}.`)