Project

General

Profile

What is my best option to implement tigase plugin for Apple Push notification

Ehsan Mozaffari
Added over 3 years ago

Hi

We are going to use Tigase-server to send offline messages to iPhone devices using Apple Push Notification service. Actually, I am going to develop Tigase server-side to achieve this goal.

I've been studying the Tigase development documentation for a few days and it seems I can use two ways for this purpose:

  1. Creating a customized small plugin and component to process all incoming packets to imitate a few functionalities of AMP.

  2. Cloning the current AMP Plugin with a few changes to send Apple Push Notification

Do you have any suggestion which approach would be a better choice to implement ?

Thanks in advance.


Replies (7)

Avatar?id=6023&size=32x32

Added by Artur Hefczyc TigaseTeam over 3 years ago

I am always in favor of having small and simple things dedicated to do one thing, so the first option is what I would do.

Added by Ehsan Mozaffari over 3 years ago

Thank you for the quick response. ;)

I've read the following documents and forum topics,I found them useful for developing Components , however, I am a little bit confused about the plugins especially when it comes to interactions between plugins and components.

I really appreciate if you could refer me to some more detailed plugin documents or a simple block of plugin code.

Links:

[[[https://projects.tigase.org/boards/4/topics/1630]]]

[[[http://docs.tigase.org/tigase-server/7.0.0/Development_Guide/html_chunk/How_Packets_are_Processed_by_the_SM_and_Plugins.html]]]

[[[http://docs.tigase.org/tigase-server/7.0.0/Development_Guide/html_chunk/wpc.html]]]

[[[http://docs.tigase.org/tigase-server/7.0.0/Development_Guide/html_chunk/pluginconf.html]]]

[[[http://docs.tigase.org/tigase-server/7.0.0/Development_Guide/html_chunk/componentdevelpoment.html]]]

[[[http://docs.tigase.org/tigase-server/7.0.0/javadoc/]]]

And so on.

Added by Ganesh Krishnan over 3 years ago

I have built a tiny plugin that does this job. The GCM server key and GCM id is hardcoded in the plugin and all it does is override process method. Then I extract id, from, to and msg body from the message and create a JSON message for PUSH notification

Added by Ehsan Mozaffari over 3 years ago

Thanks

I have got a problem with MUC offline message and I do not know what am I do now!.

I read a portion of xmpp ebook topics about MUC and I cannot figure it out when user left the group, how can I send the push notification to it(user is a member of group) because he/she left the group and the group does not sent messages to the user that is unavailable now.

Thanks ganesh. Would it be possible to send me your plugin and how to implement this plugin.

I appreciate your modesty.

Added by Wojciech Kapcia TigaseTeam over 3 years ago

Ehsan Mozaffari wrote:

Thanks

I have got a problem with MUC offline message and I do not know what am I do now!.

I read a portion of xmpp ebook topics about MUC and I cannot figure it out when user left the group, how can I send the push notification to it(user is a member of group) because he/she left the group and the group does not sent messages to the user that is unavailable now.

Well, that's how specification defines the behaviour - user receives the messages only when is online and joined the group. Once left the messages will not be send.

You could try working around that by disabling sending offline message to the MUC component / leaving the room so in the end component would still consider user as present in the room and continue broadcasting messages to him.

Added by Ehsan Mozaffari over 3 years ago

Thank you and sorry for my late reply.

To disable sending offline message to MUC I added the following line into my init.properties

sess-man/plugins-conf/message-archive-xep-0136/store-muc-messages=false

It is strange because still I am receiving MUC offline messages at the server side and no message is sent by component to the participant that left the group.

Do I missed something to test the suggested work around solution?

tigase version is: b3821

The following attachment is my init.properties file

Thanks a lot.

Added by Andrzej Wójcik IoT 1 CloudTigaseTeam over 3 years ago

To disable sending offline message to MUC I added the following line into my init.properties

sess-man/plugins-conf/message-archive-xep-0136/store-muc-messages=false

This setting is by default disabled and is responsible for not storing message sent to user while connected to MUC to Message Archive.

As I suppose you want to:

disabling sending offline message to the MUC component / leaving the room so in the end component would still consider user as present in the room

but as far as I know there is no setting to do this. You will need to develop some solution in code.

    (1-7/7)