From 5c7205e4b32832383a65a138e64ae5ef436d76ed Mon Sep 17 00:00:00 2001 From: Melissa Noelle Date: Wed, 7 Jan 2015 13:02:11 -0500 Subject: [PATCH] Added in room and contact objects to invite for candy:core:chat:invite. --- src/core/event.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/core/event.js b/src/core/event.js index 998242f7..fe66a017 100644 --- a/src/core/event.js +++ b/src/core/event.js @@ -482,9 +482,19 @@ Candy.Core.Event = (function(self, Strophe, $) { } if(directInvite.length > 0) { + fromUser = Candy.Core.getRoster().get(msg.attr('from')); + room = Candy.Core.getRoom(directInvite.attr('jid')); + + /* + * (Candy.Core.Chatroom) room - + * (Candy.Core.Contact) from - + * (String) reason - + * (String) password - + * (String) continuedThread - + */ invite = { - roomJid: directInvite.attr('jid'), - from: msg.attr('from'), + room: room, + from: fromUser, reason: directInvite.attr('reason'), password: directInvite.attr('password'), continuedThread: directInvite.attr('thread')