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

Commit

Permalink
Merge pull request #236 from joshuah/other-event
Browse files Browse the repository at this point in the history
Added new event "candy:core:chat:message:other".
  • Loading branch information
mweibel committed Mar 5, 2014
2 parents 987be20 + 927f44d commit 2b04956
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 3 deletions.
13 changes: 13 additions & 0 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.

13 changes: 13 additions & 0 deletions src/core/event.js
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,19 @@ Candy.Core.Event = (function(self, Strophe, $) {
subject: msg.children('subject').text(),
message: msg.children('body').text()
});
} else if (typeof type === 'undefined') {
/** Event: candy:core:chat:message:other
* Messages without a type attribute.
* (e.g. MUC invites.)
*
* Parameter:
* (String) type - Message type [default: other]
* (Object) message - Message object.
*/
$(Candy).triggerHandler('candy:core:chat:message:other', {
type: 'other',
message: msg
});
}
return true;
},
Expand Down

0 comments on commit 2b04956

Please sign in to comment.