Skip to content
This repository has been archived by the owner on Nov 21, 2024. It is now read-only.

Commit

Permalink
No need to look for this over and over
Browse files Browse the repository at this point in the history
  • Loading branch information
benlangfeld committed Jul 10, 2014
1 parent 1532df3 commit bc2fa19
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 9 deletions.
7 changes: 4 additions & 3 deletions candy.bundle.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion candy.bundle.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion candy.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion candy.min.map

Large diffs are not rendered by default.

8 changes: 5 additions & 3 deletions src/core/event.js
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,9 @@ Candy.Core.Event = (function(self, Strophe, $) {

// Inspect the message type.
if (type === 'normal' || type === 'undefined') {
if($(msg).find('invite').length > 0) {
var invite = msg.find('invite');

if(invite.length > 0) {
/** Event: candy:core:chat:invite
* Incoming chat invite for a MUC.
*
Expand All @@ -264,8 +266,8 @@ Candy.Core.Event = (function(self, Strophe, $) {
*/
$(Candy).triggerHandler('candy:core:chat:invite', {
roomJid: fromJid,
from: $(msg).find('invite').attr('from') || 'undefined',
reason: $(msg).find('invite').find('reason').html() || ''
from: invite.attr('from') || 'undefined',
reason: invite.find('reason').html() || ''
});
}

Expand Down

0 comments on commit bc2fa19

Please sign in to comment.