From 43814889146dcd94e91799a973ee88adb70c8412 Mon Sep 17 00:00:00 2001 From: Melissa Noelle Date: Wed, 7 Jan 2015 14:37:44 -0500 Subject: [PATCH] Add in chatroom and chat user objects. --- src/core/event.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/core/event.js b/src/core/event.js index 998242f7..a0ac01be 100644 --- a/src/core/event.js +++ b/src/core/event.js @@ -673,19 +673,21 @@ Candy.Core.Event = (function(self, Strophe, $) { * Also triggered when the local client gets kicked or banned from a room. * * Parameters: - * (String) roomJid - Room - * (String) roomName - Name of room + * (Candy.Core.Chatroom) room - * (String) type - Presence type [kick, ban, leave] * (String) reason - When type equals kick|ban, this is the reason the moderator has supplied. - * (String) actor - When type equals kick|ban, this is the moderator which did the kick + * (Candy.Core.Chatuser) actor - When type equals kick|ban, this is the moderator which did the kick * (Candy.Core.ChatUser) user - user which leaves the room */ + + var room = Candy.Core.getRoom(roomJid) + var actorUser = Candy.Core.getRoster(actor); + $(Candy).triggerHandler('candy:core.presence.leave', { - 'roomJid': roomJid, - 'roomName': roomName, + 'room': room, 'type': action, 'reason': reason, - 'actor': actor, + 'actor': actorUser, 'user': user }); },