Does OpenFire or XMPP Protocol support Message Notification (Pending, Delivered, Read) like BBM (Blackberry Messenger) - xmpp

I am a beginner and need help.
I am currently involved in a project, where required to build a chat application (server side and client side).
After further explore, eventually I was interested in XMPP.
For XMPP Server, I have been interested in the Openfire, which support XMPP Protocol. The question that remains unanswered is whether Openfire can be extended to the needs of Message Notification, which is a feature of the Blackberry Messenger which can determine whether a message is PENDING, DELIVERED, or has been READ by the client (user).
Can anyone help me?

As the (almost!) duplicate thread mentions, this question seems to be about XEP-0184.
See also:
XEP-0079: Advanced Message Processing
http://xmpp.org/extensions/xep-0079.html
Discussion thread: XEP-0184 Message Receipts
http://community.igniterealtime.org/thread/35128
Add support for XEP-0184: Message Delivery Receipts
[Status: Open]
http://issues.igniterealtime.org/browse/OF-434

Related

How to receive message stanza without sending self presence?

I am using mongooseim with Android and Ios application. I just want to receive message from the server from background without sending self presence to anyone because this task is done by system. But I can't receive message stanza until I send my presence to the mongooseIM.
Do I missing something or there is a way by which I can get quick update from MongooseIM server in the background without sending presence?
As far as I understand you all you want to do is sync the messages when you receive a Push Notification. MongooseIM can be configured to serve a simple HTTP API with which you can get archived messages (mod_mam needs to be enabled) without establishing the XMPP connection. More details can be found in the HTTP API doc, especially the Swagger doc regarding get messages. Let me know if this suites you.

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?

Strophe XMPP receiving only stanzas with full JID

I'm creating a web XMPP client to connect to an XMPP ejabberd server and I have the following problem:
My client can send messages just alright.
The problem is when I try to receive messages. I only receive stanzas directed to my full JID, that is including the resource I am using, so I don't receive stanzas directed to my user#domain but I do receive stanzas sent to my user#domain/resource.
This is not an ideal situation since the other clients I need to communicate with work with bare JIDs.
I have little experience with Strophe so maybe someone with more experience can illustrate what I'm doing wrong. Thanks in advance!
Have you checked if your xmpp server offers a setting to route messages to all resources?
OpenFire offers a property named route.all-resources which will forward messages to all resources for a person.
Also, you may want to adjust the priority of your resource, as only the resource with the highest priority will have the message sent to it (if the message does not specify a resource).
Here is an example of setting your resource priority to 10 with Strophe.js
connection.send($pres().c("priority").t("10"));
This article describes the intended behaviour, and also this answer from a related question may help you understand what's happening.

Getting online presences for Facebook Chat

I'm using libpurple to connect to the FB chat. The problem is that I do not get online presences from friends who are online the via mobile Facebook application.
But if such a friend sends me a message, I get both the message and online presence for him at the same time.
It looks like this:
(14:23:08) jabber: Recv (ssl)(191): <message from="-mybyddyid#chat.facebook.com" to="myownid#chat.facebook.com/b94353f3_4CE87B53BB319" type="chat"><composing xmlns="http://jabber.org/protocol/chatstates"/></message>
(14:23:10) jabber: Recv (ssl)(188): <message from="-mybyddyid#chat.facebook.com" to="myownid#chat.facebook.com/b94353f3_4CE87B53BB319" type="chat"><active xmlns="http://jabber.org/protocol/chatstates"/></message>
(14:23:11) jabber: Recv (ssl)(166): <presence from="-mybyddyid#chat.facebook.com" to="myownid#chat.facebook.com/b94353f3_4CE87B53BB319"><x xmlns="vcard-temp:x:update"><photo/></x></presence>
So I am wondering whether it's my fault or the limitation Facebook Chat implementation.
I think there will be a delay for presence updates. Maybe you can check this out asking your friends not to send a message and waiting for the presence to change. From the facebook chat developers page [1] it seems that there will be a delay after which the presence will get updated when you change it.
Also, from the same page, one of the limitations is that the facebook chat server doesn't support presence probes. An XMPP server sends presence probes to contacts if it doesn't already have the presence information of the contacts after the user logs in and sends the initial presence (see section 5.1.1 of RFC 3921 [2], and section 4.3.1 of RFC 6121 [3]).
If the server cant send presence probes, it may not have the presence information of the contacts. I dont know how the facebook chat server was implemented, but I am guessing that when the contact does something (like sending a message/updating the presence), the server assumes that the contact is online and sends the presence. (I may be wrong here, someone correct me if I am!)
References:
[1] http://developers.facebook.com/docs/chat/
[2] http://xmpp.org/rfcs/rfc3921.html
[3] http://xmpp.org/rfcs/rfc6121.html

Send XMPP message without starting a chat

I am basically writing a XMPP client to automatically reply to "specific" chat messages.
My setup is like this:
I have pidgin running on my machine configured to run with an account x#xyz.com.
I have my own jabber client configured to run with the same account x#xyz.com.
There could be other XMPP clients .
Here is my requirement:
I am trying to automate certain kind of messages that I receive on gtalk. So whenever I receive a specific message eg: "How are you" , my own XMPP client should reply automatically with say "fine". How are you". All messages sent (before and after my client replies) to x#xyz.com but should be received by all clients (my own client does not have a UI and can only respond to specific messages.).
Now I have already coded my client to reply automatically. This works fine. But the problem I am facing is that as soon as I reply (I use the smack library), all subsequent messages that are sent to x#xyz.com are received only by my XMPP client. This is obviously a problem as my own client is quite dump and does not have a UI, so I don't get to see the rest of the messages sent to me, thereby making me "lose" messages.
I have observed the same behavior with other XMPP clients as well. Now the question is, is this is a requirement of XMPP (I am sorry but I haven't read XMPP protocol too well). Is it possible to code an XMPP client to send a reply to a user and still be able to receive all subsequent messages in all clients currently listening for messages? Making my client a full fledged XMPP client is a solution, but I don't want to go that route.
I hope my question is clear.
You may have to set a negative presence priority for your bot..
First thing to know is that in XMPP protocol every client is supposed to have a full JID. This is a bare JID - in your case x#xyz.com with a resource in the end e.g. x#xyz.com/pidgin or x#xyz.com/home (where /pidgin and /home are the resource). This is a part of how routing messages to different clients is supposed to be achieved.
Then there are the presence stanzas. When going online a client usually sends a presence stanza to the server. This informs about e.g. if the client is available for chat or away for lunch. Along with this information can be sent a priority. When there are more than one clients connected the one with the highest priority will receive the messages sent to the bare JID (e.g. ClientA(prio=50) and ClientB(prio=60) -> ClientB receives the messages sent to x#xyz.com). But there are also negative priorities. A priority less than 0 states that this client should never be sent any messages. Such a stanza might look like this
<presence from="x#xyz.com/bot">
<priority>-1</priority>
</presence>
This may fit your case. Please keep in mind it also depends on the XMPP server where your account is located, which may or may have not fully implemented this part of the protocol.
So to summarize: I recommend you to look through the Smack API how to set a presence and set the priority to <0 for your bot client right after it connected.