Permalink
Browse files

Fix the endsong

  • Loading branch information...
alaingilbert committed Oct 24, 2011
1 parent 06c0104 commit 64850340a990e1572fde4df10783e6724a485cb8
Showing with 3 additions and 1 deletion.
  1. +3 −1 bot.js
View
4 bot.js
@@ -184,8 +184,10 @@ Bot.prototype.onMessage = function (msg) {
self.emit('nosong', json);
break;
case 'newsong':
+ if (self.currentSongId) {
+ self.emit('endsong');
+ }
self.currentSongId = json.room.metadata.current_song._id;
- self.emit('endsong');
self.emit('newsong', json);
break;
case 'update_votes':

0 comments on commit 6485034

Please sign in to comment.