I have installed Openfire 3.10.2
on Ubuntu 12.04
.
Chat is working fine and for offline message management I have installed the CallbackOnOffline plugin. When the recipient is offline, a url is called.
The plugin loads the url from the plugin.callback_on_offline.url
property, adds 'to' and 'from' parameters and executes an asynchronous GET request. Sample Link.
I checked what information I get from that and I got a "to" and "from", but I also need those along with the message for the push notifications.
Important Part :-
I want to customize CallbackOnOffline plugin of openfire and I want to add one more parameter "message". How can I do that?
You will find the code here: https://github.com/igniterealtime/Openfire/blob/master/src/plugins/callbackOnOffline/src/java/com/fotsum/CallbackOnOffline.java
Now, how to create .jar file, which require to make installable plugin in openfire ?
If you want to add more parameters to the link. You need to extend the CallbackOnOffline Plugin. You will find the code here: https://github.com/igniterealtime/Openfire/blob/master/src/plugins/callbackOnOffline/src/java/com/fotsum/CallbackOnOffline.java
If you look into the java class, you will find on line 109 and 110 the "to" and "from" parameter which will be send back (callback). Just add there your parameter with value you need.
Update: After that you need to build the plugin with ANT again. See a how to build a plugin: https://www.igniterealtime.org/builds/openfire/docs/latest/documentation/plugin-dev-guide.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With