From 7ed5d2317168473901abb7c6ea3e018742f39524 Mon Sep 17 00:00:00 2001 From: Melissa Noelle Date: Wed, 7 Jan 2015 13:48:02 -0500 Subject: [PATCH 1/2] Removed roomJid and roomName in favor of finding the room object and passing it in. --- src/core/event.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/core/event.js b/src/core/event.js index 998242f7..a318256e 100644 --- a/src/core/event.js +++ b/src/core/event.js @@ -625,20 +625,21 @@ Candy.Core.Event = (function(self, Strophe, $) { } } } + + var room = Candy.Core.getRoom(roomJid); + /** Event: candy:core.presence.room * Room presence updates * * Parameters: - * (String) roomJid - Room JID - * (String) roomName - Room name + * (Candy.Core.Chatroom) room - The room object * (Candy.Core.ChatUser) user - User which does the presence update * (String) action - Action [kick, ban, leave, join] * (Candy.Core.ChatUser) currentUser - Current local user * (Boolean) isNewRoom - Whether the room is new (has just been created) */ $(Candy).triggerHandler('candy:core.presence.room', { - 'roomJid': roomJid, - 'roomName': room.getName(), + 'room': room, 'user': user, 'action': action, 'currentUser': currentUser, From 54bb84b3d7997e6b069ebce753cc777197a6d29a Mon Sep 17 00:00:00 2001 From: Melissa Noelle Date: Fri, 9 Jan 2015 11:31:05 -0500 Subject: [PATCH 2/2] We have already created the room variable. --- src/core/event.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/core/event.js b/src/core/event.js index a318256e..cbd419d4 100644 --- a/src/core/event.js +++ b/src/core/event.js @@ -626,8 +626,6 @@ Candy.Core.Event = (function(self, Strophe, $) { } } - var room = Candy.Core.getRoom(roomJid); - /** Event: candy:core.presence.room * Room presence updates *