0
votes

I have successfully created a multiuserchat group, but the user goes offline the user is removed from the group, and i want to have the history of messages to save for the user the next time he logs in. I found some approaches from previous and deduced as follows

  1. There are several old answers out there but none of them is based on new SMACK API 4.1.5+

  2. using "Stream Management", but i have no idea what and how to do it, How it helps to solve my problem.

  3. Using a PUBSUB for getting messages and delivering to user and showing the pseudo-list of users

I want to know the best and effective approach or any libs which help to achieve my result. I am a newbie to XMPP and have 2+ year experience in java

NOTE: I am looking for a whatsapp group chat implementation to kick/invite/providing_permissions to the user and history of messages for notifications/when he is offline.

I am searching for this from long time , Any Help is really appreciated. Thanks in advance.

4
..have u found any solution for this???BMM
I left after trying a lot for this, If you are not looking for open source & ready to spend some money. I feel firebase is a very easy and best option for this. You may find alternatives too..Hard Coder
Thanks @Hard CoderBMM

4 Answers

0
votes

I think there are a couple of options:

You can try to prevent clients from leaving / disconnecting, or rejoining seamlessly, which is all pretty hard, and probably won't be possible to do completely right.

An alternative: The Openfire MUC implementation can be configured to send the entire history (or a configurable amount of last entries) when a participant joins the room. This is a crude way of retrieving all messages that were sent before you joined.

Another option is tapping into the history of a MUC room in another way: I think that the monitor plugin saves the history of a room to a database (or at least, should do this). Perhaps you can tap into that. If all else fails, you could create your own plugin, that does something similar: intercept all messages to/from a MUC server-sided, save them to a database, and allow clients to retrieve this history somehow.

With any solution, you should take into consideration privacy. When you're storing data, and make that retrievable, you should think hard on who is going to see what.

0
votes

@hard-coder: Seems like you are viewing things from client side, while @guus proposed server side solutions. And as per your requirement: whatsapp group chat implementation server side solutions will work as it can't be done on client side.

WhatsApp has custom implementation of MUC on top of XMPP, so either you have to develop that in Openfire Server by customizing it. Or wait for the implementation of MIX in any server: Openfire, Ejabberd, MongooseIM.

Also take a look at MUC Light implemented by MongooseIM

If you want the solution, you can always get Business Edition of Ejabberd or MongooseIM which have the features you desire. But they are commercial solutions.

0
votes

MUC is not full functional in openfire server. And use this to get chat history : Retrieve history chat Openfire XMPP framework

0
votes

save messages and group names in database, when connecting to xmpp, connect to all groups from the database