Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #25 from powdahound/mention-names

Collect @mention name values for bot and users
  • Loading branch information...
commit 04fa9a9336e77a8d255dcdefdf1a5eb8e3a5d88b 2 parents 03df5cb + 04831c2
@cjoudrey authored
Showing with 7 additions and 1 deletion.
  1. +7 −1 lib/bot.js
View
8 lib/bot.js
@@ -79,6 +79,10 @@ module.exports.Bot = (function() {
// now that we have our name we can let rooms be joined
self.name = data.fn;
+
+ // this is the name used to @mention us
+ self.mention_name = data.nickname;
+
self.emit('connect');
});
};
@@ -287,7 +291,9 @@ module.exports.Bot = (function() {
stanza.getChild('query').getChildren('item').map(function(el) {
rosterItems.push({
jid: el.attrs.jid,
- name: el.attrs.name
+ name: el.attrs.name,
+ // name used to @mention this user
+ mention_name: el.attrs.mention_name,
});
});
}
Please sign in to comment.
Something went wrong with that request. Please try again.