Have any one implemented MUC Light that is Beta released in MongooseIM Chat server for XMPP.
How to fetch fetch following messages when
1) User are offline while they were added as participants of group.
2) Users who are members byt offline and get messages on the muc light group.
I have achieved mod_zero push to trigger the offline message to Users, Also able to store the message in mam_muc_message table in my chat server MySQL database. But how the client will fetch these messages and also be notified with all messages.
Any guidance is much appreciated.
http://mongooseim.readthedocs.io/en/latest/open-extensions/muc_light/
Thanks for suggestion and comments here is how i managed with small limitation.
When user is offline while he was added by some group by others, he wont get this create group stanza as muc-light suggest.
When he come online , there have to be someone atleast who send a group message
When he gets this message I fetch the group configuration and create a new group first and keep this message as pending to process.
Once group created then i link this pending message to this group.
Then I call the MUC light MAM messages as given in 6.2 XEP-0313 Message Archive Management
Then I fetch all the previous messages and add in my database and display on the screen.
The only limitation that is there is after he come online he can't go to server and ask ALL muc-light messages, some how coz the server is not available is thrown if I ask for traditional MAM process to give messages for muclight.****.com group ID so I use as they asked to fetch in above link.
Hope MUC Light Beta is improving ahead more taking this into consideration.
Related
Is it possible to maintain both group text messages and single text messages with users and keep them separate? I understand there is no concept of a group message per se, but wanted to see if any recent advances in tech has made this possible with Twilio or other providers.
In short, I am creating a POC where a user inside an iOS App can send invoke an API call to my backend application. This application receives a phone number from someone's contact list, and then connects to Twilio to send the SMS message to that target user.
When the user replies, I was researching Twilio Web hooks to receive the message, and then save it in the database. The originating user, then, would be able to see the message on a screen.
I would guess that when a user responds to the twilio message, the only metadata that comes in is their message and phone number, so the "foreign key" is the phone number.. Thus when I save it in my database, I have their phone number and message.
This works up until someone decides to target two or more people in an SMS message using my API, and then target one of those people individually. For example they select me as a sole recipient, and then select me and someone else as a group text message.
In this case, how could my system/Twilio differentiate between if I was responding to the group message, or to the single message?
Any ideas or work arounds? Maybe another technology? Thanks!
I wanted to provide an answer to this in case anyone else was looking into this.
Essentially you pay 3 cents (0.03) per month per active user in each group. Basically you buy phone numbers for each group chat you need.
https://www.twilio.com/conversations/pricing
So if you're doing a million group chats obviously it can get costly, but for simple POCs this isn't the end of the world.
Enjoy!
Every time when I’m signing into the app or reinstalling app I didn’t receive group message history. I have searched a lot for message archiving in MUC for iOS. Ejabberd doesn’t provide me old messages of the group although I configured setting into the YML file as mentioned in the attached image. I have kept history size of 10. It means at least 10 messages must be fetched every time when I login into the app or reinstall the app but I could not receive 10 messages every-time after reinstalling the app. I’m using Robbiehanson/XMPPFramework for iOS to implement XMPP based chat. I also performed MucSub based MUC to send/receive messages.
The scenario which I have performed:
I’m part of one MUC group. The member of the associated group sent 15 Messages into the group. I have received all those messages when I’m online. Now I am logged out from the group. Deleted the app from the device and reinstalled it into the device with the same login credentials. At this time I could not see the 15 messages which I received earlier. Here I would like to get all 15 Messages even after reinstalling the app into the iOS device.
I have searched on various Stack overflow questions but none of them are helpful to me. Your help will be appreciated.
Maybe you can try joining the room by specifying the history element with the maxstanzas specified.
We have similar case like we need last 3 months history while joining the room, So we mentioned that in history tag, Like below code sample
let historyElement = DDXMLElement(name: "history")
historyElement.addAttribute(withName: "since", stringValue: ((lastDate as NSDate).addingTimeInterval(1).xmppDateTimeString())!)
room.join(usingNickname: userJidString, history: historyElement)
I'm writing a simple mini-chat with custom User model and authentication via omniauth. The chat uses web-socket faye-rails to send and display messages instantly without refreshing the page. The matter is that I'd like to add private messages - I mean, that I can choose an user and start our own dialog in a secondary chat window. I've looked for the solutions, but everything I found was about e-mailing - with inbox messages, trash cans and so on. So I wonder if there's any solution easy to implement.
The source code of my chat is here
Welcome to push technology and active web design!
When someone logs in, present them with a list of friended accounts and logged in state. For logged in friends, they can select a friend from the list and start a chat session in a new window. For logged out friends, they can send a message that's delivered the next time the recipient logs in.
You'll then have to create a friending mechanism that allows a user to request a connection to a prospective friend, be notified of pending connection requests, approve friend requests, and an unfriend feature. Hopefully that one won't be used too often.
I've worked with Faye & I like Faye but also take a quick look at the beta release of Rails 5. Action Cable will do the same thing and the framework support is better.
I am working on ejabberd for quite sometime now, I am replacing a third party Chat infra with Ejabberd inhouse. As it was production switch so we need to maintain the previous chat messages while switching to ejabberd.
So I have created all the rosters, migrated users to ejabberd which is all working fine, now main challenge that I am facing is with message migration. I am using mysql for users, rosters and messages. I am running a script which is directly pushing data to ejabberd mysql from previous chat infra.
But when I am connecting to a user, I am able to see new chat messages which were sent through ejabberd, but migrated chats for same user is not visible and not propagated back to client.
Can someone help here ?
Here are the two entries which I had put in mysql, first one is ejabberd entry and other one is manual, client is able to sync first one but not another.
username timestamp peer bare_peer xml txt id kind nick created_at
xyz-customer 1454573488523175 abc-provider#xxx.amazonaws.com abc-provider#xxx.amazonaws.com "<message from='xyz-customer#xxx.amazonaws.com/2131165549e1bc6553-32b9-4ec4-92bd-c9ed80fb5374' to='abc-provider#xxx.amazonaws.com' xml:lang='en' id='oG3Vb-568' type='chat'><body> CnsfjffsjJ</body><thread>90275196-0096-4bb4-a95d-d72ea5238f74</thread><request xmlns='urn:xmpp:receipts'/><delay xmlns='urn:xmpp:delay' stamp='2016-02-04T08:11:27.194+00:00' from='xyz-customer#xxx.amazonaws.com/2131165549e1bc6553-32b9-4ec4-92bd-c9ed80fb5374'/><markable xmlns='urn:xmpp:chat-markers:0'/><request xmlns='urn:urbanclap:request' requestId=''/><active xmlns='http://jabber.org/protocol/chatstates'/></message>" " CnsfjffsjJ" 208044 chat "2016-02-04 08:11:28"
xyz-customer 1454570506606317 abc-provider#xxx.amazonaws.com abc-provider#xxx.amazonaws.com "<message from='xyz-customer#xxx.amazonaws.com' to='abc-provider#xxx.amazonaws.com' xml:lang='en' id='I5sO7-2' type='chat'><body>GB hard</body><request xmlns='urn:xmpp:receipts'/><markable xmlns='urn:xmpp:chat-markers:0'/><active xmlns='http://jabber.org/protocol/chatstates'/></message>" "GB hard" 208045 chat NULL "2016-02-04 07:21:46"
I guess you are trying to fill the message archive table, but are expecting offline messages delivery. Please, make sure you are adding the message in the right table. I guess you are writing in archive table but should write in spool.
Please note that spool table to deliver offline message is only check on new user login. It is not a way to add messages to deliver to the user in a running session. It means you cannot really sync two running platforms by just writing in MySQL message table. You would need to actually route the messages by writing a custom ejabberd plugin.
I had implemented group chat, which is working fine. But problem is that:
how can i receive offline message when user goes out from group.
I had tried, When i set status of user to unavailable from group/chat session, the ejabbered doesn't store messages for that user.
And even doesn't store message in spool table.
Anyone please share some stuff!
Thanks!
Query to server with date parameter from current date to your desire past date .