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

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

Related

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

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?

Not able to get skype group chat as well as bot messages

When call this API then getting below error
https://skype.botframework.com/v3/conversations/29%3Adg_yugtechno/activities
{"error":{"code":"BadArgument","message":"Failed to decrypt conversation id"}}

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.

invite gtalk user via xmpphp

I have set up a basic install of XMPPHP and to test it I tried sending a message from one of my gtalk (GoogleTalk) accounts to another gTalk account. The receiving account did not show the message, or the normal "user * has sent you a message: accept/block"
I then sent my receiving account a chat message from within the Google interface, and it prompted me (as expected) to add my account to the list of approved chat people.
Once my sending account was on the "approved" list, i was able successfully to send messages with xmpphp with no problem.
My question: Using xmpphp, how do i send an INVITATION to chat? I can send messages fine once the recipient accepts my incoming chats, but the first message sent does not trigger the chat program to prompt me to accept the messages.
As a follow-up...is there a way to find out if the recipient has accepted the request? ANy way to know that the messages are being delivered (or not)?
I had the same problem and the solution is to send a "subscribe" request before the message.
So just call
$conn->subscribe('someguy#someserver.net');
before
$conn->message('someguy#someserver.net', 'This is a test message!');

How can I inform an XMPP sender of other clients sending messages on the sender's behalf?

I'm building a chat service that supports connectivity over the web as well as XMPP. Assume we have two users, Alice and Bob, chatting with each other over the web interface. Alice is simultaneously logged via web and XMPP. If Bob sends a message to Alice, she sees the message in both clients, but if she replies via the web, the XMPP client ends up with a one-sided conversation: Alice's messages won't be part of the chat history, but Bob's messages will continue to arrive.
Is there any way in XMPP to inform a sender that a different client sent a message on the sender's behalf, to keep the conversations synchronized?
Get your server vendor to implement XEP-0280: Message Carbons. Then you'll need to turn it on in your client.