I basically write an XMPP client to automatically respond to specific specific messages.
My setup is this:
I have pidgin installed on my machine, configured to work with the
x@xyz.com account.
I have
my own jabber client configured to work with the same account
x@xyz.com .
There may be
other XMPP clients .
Here is my requirement:
I am trying to automate certain messages that I receive on gtalk. Therefore, whenever I receive a specific message, for example: "How are you", my own XMPP client should respond automatically, saying "fine". "How are you". All messages sent (before and after my clientβs response) to x@xyz.com , but must be received by all clients (my own client does not have a user interface and it can only reply to specific messages.).
Now I have already encoded my client for an automatic response. It works great. But the problem that I encountered is that as soon as I reply (I use the smack library), all subsequent messages sent to x@xyz.com are only accepted by my XMPP client. This is obviously a problem, since my own client is pretty dump and does not have a user interface, so I do not see other messages sent to me, thereby making me "lost" messages.
I have observed the same behavior with other XMPP clients. Now the question is whether this is an XMPP requirement (sorry, but I did not read the XMPP protocol too well). Is it possible to encode an XMPP client to send a response to the user and still be able to receive all subsequent messages for all clients that are currently listening to messages? Providing the client with a full-fledged XMPP client is a solution, but I do not want to go this route.
Hope my question is clear.
source share