You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some scripts respond to users entering (or leaving) a room, as in:
robot.enter (msg) ->
username = msg.message.user.name
room = msg.message.user.room
if username isnt robot.name
robot.logger.info "User #{username} entered the room #{room}"
With hubot-xmpp, this is not working for me when users enter the room for the first time. It works though, when people change their status (eg: available from away), and when hubot joins the room.
Coming from hubot-irc, I expected it to work only when users enter the room for the first time, and not in other cases. Looks like hubot-xmpp is reading presence stanzas and because xmpp sends presence for every person in a room whenever hubot joins the room or when user status changes, robot.enter is being triggered all the time:
Even if this was intended, I would still like the functionality to work when people just enter the room (useful for messaging people about the room and its rules, or just general help).
Not a high priority for us right now, but I want to look more into this later. Suggestions are welcome!
The text was updated successfully, but these errors were encountered:
Could it be the implementation of XMPP on the server itself? I ask because I'm using this exact same functionality to create a NOC "warroom" where everything is logged (even when people join / disconnect) and it's working flawlessly when used with Cisco Jabber.
Some scripts respond to users entering (or leaving) a room, as in:
With hubot-xmpp, this is not working for me when users enter the room for the first time. It works though, when people change their status (eg: available from away), and when hubot joins the room.
Coming from hubot-irc, I expected it to work only when users enter the room for the first time, and not in other cases. Looks like hubot-xmpp is reading presence stanzas and because xmpp sends presence for every person in a room whenever hubot joins the room or when user status changes, robot.enter is being triggered all the time:
https://github.com/markstory/hubot-xmpp/blob/7fbc3a8d25a93defd1b773fb673202e42c82b0e7/src/xmpp.coffee#L343
Even if this was intended, I would still like the functionality to work when people just enter the room (useful for messaging people about the room and its rules, or just general help).
Not a high priority for us right now, but I want to look more into this later. Suggestions are welcome!
The text was updated successfully, but these errors were encountered: