Skip to content

Commit

Permalink
Removed session data from user
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeFoodPixels committed Jan 17, 2016
1 parent 48054b6 commit 886c090
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,10 @@ hangouts.prototype.init = function(){

self.connection.on('stanza', function(stanza) {
if (stanza.is('message') && (stanza.attrs.type !== 'error') && (stanza.getChildText('body'))) {
self.messageRecieved(stanza.attrs.from, stanza.getChildText('body'));
var userParts = stanza.attrs.from.split('/');

userParts = userParts.slice(0, userParts.length - 1);
self.messageRecieved(stanza.attrs.from, stanza.getChildText('body'), userParts.join('/'));
}

if(stanza.is('presence') && stanza.attrs.type === 'subscribe') {
Expand Down

0 comments on commit 886c090

Please sign in to comment.