How to Get offline message count for muc room using Stophe js - ejabberd

I am developing a chat application using
ejabberd and Strophe.js .
my question is how to get offline message of muc room.or give some example to how to implement message delivery receipts in strophe js plugin.

The concept of offline messages is applicable to conversations between a user and another user. I don't understand how it can be applied to MUC rooms, and most probably it cannot be done.

Related

Can eJabberd call an API if a roster contact does not exist?

Ejabberd newbie here. I hope this question makes sense.
We had a need to setup our own XMPP server so that customers on web and a Bria client can utilize it. I was able to get the basics up and running using ejabberd.
All users will be in the 'xmpp.exampledomain.com'
We also have a custom SMS gateway we built (which is really a server which can accept json APIs).
So what I am trying to accomplish:
Our platform would create a 'normal' xmpp user so the user can login to ejabberd.
This user can add roster contacts of other 'normal' xmpp users.
If this user wants to send messages via SMS, we would instruct them to add roster contacts (i assume) with the format 12125551234#sms.exampledomain.com. (adding the contact works currently)
If a user sends a message to this "SMS" contact, have ejabberd call our custom SMS gateway via a json API instead of attempting to deliver via normal xmpp.
Is this even possible?
For inbound from the SMS Gateway server, can call the ejabberd API send message function, so inbound is fairly easy.
I appreciate any suggestions
thanks
What you want was called a "transport" in the old days of IRC, ICQ, AIM and MSN. They were programs that you installed next to ejabberd (or other Jabber servers). Example usage:
you download a transport for ICQ
configure it to have access to ICQ,
and then configure ejabberd to connect to that transport, and allow users to contact it at address icq.example.com.
There are very old tutorials for your curiosity:
https://www.ejabberd.im/tutorials-transports/index.html
I don't know if the old "SMS-Jabber transports" will work nowadays. Searching revelaed few results:
https://www.jethrocarr.com/2013/06/03/smstoxmpp/
https://sourceforge.net/projects/jabbersms/
https://www.jabber.cz/wiki/SMS_transport
Alternatively, as you mentioned you already have a SMS program, if you can get your hands on Erlang or Elixir, you can write an ejabberd module that registers at sms.example.com, and forwards XMPP messages as json API...

Strophe js how to get last message of all user in rostered users

I am using Strophe js for ejabberd chat application.
how to
get last message of all user who all rostered with logged in user.
If you have mod_mam enabled and properly configured, it can store all the messages of all the users, and later you can request them, following https://xmpp.org/extensions/xep-0313.html

Smooch - How to access conversations with free plan and Web-Messenger widget

Just created a new account and integration with Web messenger widget on smooch.io. (So no direct API or similar, just the widget)
I can see messages coming in through the logs tab, like this:
logs of incoming messages
But maybe I am dumb or blind, but I can't figure out how or where to respond to these conversations...
Thanks for any input.
You need to integrate with a system in order to intercept these messages. You can view available systems here: https://app.smooch.io/integrations
My company integrated the web messenger with slack. Every time someone writes via the web messenger, it shows up in slack.

How to add admin chat UI using smooch?

I'm looking forward to implement chat window for admin where admin can reply to all customers. I am able to integrate chat with slack channel where admin can reply,But I couldn't find any inbuilt tool/plugin(web) available to implement that. Also didn't find any way to create a group chat.
As you probably guessed, Smooch is a platform that hooks up with popular chat systems and CRMs that already exist, such as Slack. However, Smooch itself is not a CRM, there is no Smooch admin chat UI.
It is entirely possible to build your own admin chat UI for Smooch. The first place to start would be our REST API docs.
In fact, the amazing team of developers at Front did this themselves this past February. You can give their Smooch integration a test drive here.
To answer your question about group chats: Smooch's model supports having many agents join the conversation on the business side, but a Smooch conversation is only designed to connect to a single end user identity. Note that an end user may use multiple different devices/clients to connect to a Smooch conversation (eg Facebook, SMS, etc) all end user clients connected to a conversation are considered to be owned by the same end user identity. You can find more info on how this currently works here.

How does WhatsApp syn up contacts with ejabberd

I am creating ejabberd xmpp client for charting similar to WhatsApp. Want to understand, how does WhatsApp sync contacts with server? How does WhatsApp find out all registered users with server and synchronise it with your address book?
This feature is not related to XMPP or ejabberd. If you want to detect contact of your user you need to implement that feature in a custom way.
You need to upload an anonymised version of the user address book with hash of phone number and email and store that on your server.
When another user with a phone number or email address matching that hashes join the service you can find who knows it and do operations to notify each parties that they are both using the service (and/or add them in roster for example).
So, this is a purely custom extension to ejabberd you will have to implement.