Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
Christian Joudrey authored July 05, 2012

Showing 1 changed file with 7 additions and 1 deletion. Show diff stats Hide diff stats

  1. 8  lib/bot.js
8  lib/bot.js
@@ -79,6 +79,10 @@ module.exports.Bot = (function() {
79 79
 
80 80
       // now that we have our name we can let rooms be joined
81 81
       self.name = data.fn;
  82
+
  83
+      // this is the name used to @mention us
  84
+      self.mention_name = data.nickname;
  85
+
82 86
       self.emit('connect');
83 87
     });
84 88
   };
@@ -287,7 +291,9 @@ module.exports.Bot = (function() {
287 291
         stanza.getChild('query').getChildren('item').map(function(el) {
288 292
           rosterItems.push({
289 293
             jid: el.attrs.jid,
290  
-            name: el.attrs.name
  294
+            name: el.attrs.name,
  295
+            // name used to @mention this user
  296
+            mention_name: el.attrs.mention_name,
291 297
           });
292 298
         });
293 299
       }

0 notes on commit 04fa9a9

Please sign in to comment.
Something went wrong with that request. Please try again.