How do I get hubot to list all the users in the current campfire chatroom?

1.7k views Asked by At

I've got hubot (https://github.com/github/hubot) running in a campfire chatroom.

I'm trying to make a script which shows all of the logged in users in the chatroom.

The default hubot show users command doesn't seem to find all of the logged in users.

non-working pseudocode

module.exports = (robot) ->    
  robot.respond /users$/i, (msg) ->
    for user in robot.room.users
        msg.respond user.name + "is logged in"
1

There are 1 answers

0
Larry Cai On

Try to send request via Campfire room API, it will list all the users currently inside the room.