xmppjs / hubot-xmpp

XMPP adapter for Hubot
181 stars 101 forks source link

Set nickname to robot name #51

Closed Nevon closed 10 years ago

Nevon commented 10 years ago

Currently the nickname for the robot is just the jid minus the host. It would be nicer if we set the bot nickname to @robot.name.

As far as I know, you just need to add a ´nick´ element to your ´presence´ element, like so:

new Xmpp.Element('presence').c('nick', {'xmlns': 'http://jabber.org/protocol/nick'}).t(@robot.name)
markstory commented 10 years ago

Seems reasonable to me.