Using XMPP how to get notification on chatroom creation to all participants - xmpp

I am using Openfire as an XMPP server and strophe as an XMPP client. If a chatroom c1 is created by a user a and participants are b,c,d. But b and c are online and they have an active connection with XMPP server(Openfire) So, how b and c users can join the room by getting the notification on creating of the chatroom. Is there any option available as a feature of XMPP or in Openfire?

Related

How can I get last message of each conversation(per JIDs) from openfire?

I'm developing an instant messaging app on android with SMACK library that uses OPENFIRE as a xmpp server. I want to get last message of each conversation from MessageArchiveManager in openfire server that was enabled by MONITORING SERVICE plugin(based on XEP-0313).
I know that mamManager.queryArchive() can gets the messages that related to specific jid or can get a specific number of messages that exists in server(with no custom sepration), but we suppose that smack doesn't knows which JIDs has conversation on server!
One solution is that send request per each ROSTER entry, but it has heavy cost when it contains numerous contacts and perhaps we have a conversation with anybody out of Roster. Is there any way or plugin or another extension to do this?

XMPP offline message push ejabberd

Hi I am developing a chat application using XMPP. Consider the situation in the chat application, When User A send messages to User B and if the User B is offline at that time XMPP will store the sms as offline message and it will send that messages to User B when it comes online. This is working here. But I want to send this offline messages from XMPP as push to User B. I have done lots of searching and I came in a conclusion that we need to send the offline messages from XMPP server to our backend server and from there we need to send that message as push. But how to do this, please help me
It is possible to write a custom module to do that with ejabberd API.
What you need is to use mod_offline_hook (see ejabberd Events and Hooks) to be called when the server wants to store a message in offline store.
You can read mod_offline module for inspiration.

How to get openfire chat room Archive messages using Strophe library

I use Strophe library to connect to an OpenFire XMPP server.
How can I receive the chat room archive of messages ?
I need to fetch messages based on start date and end date using strophe library.
I do not think Openfire does yet support Message Archive Management for MUC rooms yet. The code for MAM user archive support has been merged into Openfire in May, but I could not find any reference to support for MUC archiving.

Get presence from xmpp using strophe.js after subscribed user invitation

How to get the get presence from xmpp using strophe.js after subscribed user invitation.

How to send XMPP Message with a given From or ReplyTo?

I would like to initiate a Chat between two users A and B from my web application. So I create an XMPP Message using Smack Client API or directly from an OpenFire Plugin:
Send a Message by Smack from A to B
Send a Message by Smack from Server to B with replyTo A
XEP-0033 allow "replyTo address" supported by OpenFire but not suported by IM Clients.
It seems "from" can't be overrided by a client or an OpenFire plugin. I also think GTalk will not accept an xmpp message from userA#gmail.com to userB#gmail.com by ServerToServer protocol.
Is there an other way to do this ? I want my web application to forge a message from UserA to UserB. But this webapp is not A or B.
Best Regards,
Jp
Any XMPP server should ignore the from address in a stanza and stamp the one that it get's from the connection into the stanza it sends on. This is a specific feature of XMPP compliant servers and is used to stop address spoofing and spam etc. You'd probably have to edit the source of a server and change it's behaviour. This is dangerous though and I wouldn't reccomend it if you'll be federating with other servers.
J