-
Notifications
You must be signed in to change notification settings - Fork 370
Message Event Custom Data #215
Comments
PS: I'd like to let the modifyme plugin add a custom parameter indicating it's a message which is for me and handle this different from normal messages in the notifications plugin. |
This could be achieved by restructuring the event handling a bit (this might required to change the plugins a bit, sadly). This however, would require also that the plugin authors are aware that they need to return the event params again. Don't know if that's a good solution. |
Can't we just do this: $(Candy).on('candy:view.message.before-show', function(event, args) {
args.mCustomKey = 'myCustomValue';
}); |
Have a look at my fiddle ;-) I think this way the plugins have nothing to change... |
In case there's a need for other hooks, please open a new issue or reopen #215.
Thx, now I can make some improvements on the notification plugins. |
Maybe first based in the dev branch of the plugins repo until 1.6.1 is release On Thu, Jan 23, 2014 at 7:01 PM, Jonatan Männchen
|
Have a look at candy-chat/candy-plugins#75 :-) |
It would be nice to have a possibility to add custom data to the candy:view.message.before-show Event and then receive this in candy:view.message.after-show.
This would give the possibility to let plugins change the event data and handle them on after-show in a notifications-plugin for example.
The text was updated successfully, but these errors were encountered: