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
One of the primary things we use Hubot for in our office is to support pure XMPP-based staff chat (essentially XMPP broadcast). In order to make that happen, I extended hubot-xmpp to pull down the client's default roster when it connects, which then gets stored in an array on the robot.
This allows for something like...
robot.catchAll (msg) ->
from = new Xmpp.JID(msg.message.room)
text = "#{from.user}: #{msg.message.text}"
for jid in robot.xmppRoster
if from.user != jid.user
params =
to: jid.toString()
type: 'chat'
message = new Xmpp.Element('message', params).c('body').t(text)
robot.xmppClient.send message
...so we get a lightweight broadcast system that relies only on XMPP.
That's a long way of saying, if I cleaned up my implementation and made a pull request, is this something you could see being in the core library? It may be possible to simply do this as a class that extends XmppBot, but I did this a while ago and pretty quick, so I'm not 100% sure. That may be ideal, though, if possible.
The text was updated successfully, but these errors were encountered:
In our case it was definitely to avoid using chat rooms or XMPP MUCs. We couldn't get the entire staff to consistently keep any chat room open all the time; we needed something that was push and would also store history and push that as well when people were offline and missed messages. XMPP and OpenFire did everything we needed for that. The only weak link was keeping track of the user list. Originally we just added a basic persistence layer with redis, but it was kind of a pain. Just grabbing the XMPP roster made a lot more sense.
One of the primary things we use Hubot for in our office is to support pure XMPP-based staff chat (essentially XMPP broadcast). In order to make that happen, I extended hubot-xmpp to pull down the client's default roster when it connects, which then gets stored in an array on the robot.
This allows for something like...
...so we get a lightweight broadcast system that relies only on XMPP.
That's a long way of saying, if I cleaned up my implementation and made a pull request, is this something you could see being in the core library? It may be possible to simply do this as a class that extends XmppBot, but I did this a while ago and pretty quick, so I'm not 100% sure. That may be ideal, though, if possible.
The text was updated successfully, but these errors were encountered: