Hi,
We are developing corporate messaging system and plan to use ejabberd as one of delivery transports.
The problem is we need to know the message delivery status (i.e. whether it was delivered to client and when).
AFAIK there are no such functionality in XMPP and ejabberd. What is the easiest way to do it?
I can think of two main possibilities:
1. Use ejabberd with external database. In this way we can scan "spool" table for temporarily undelivered messages. But I'm not sure if message absence in this table always means that it was delivered? And obviously it'd be very ineffective method.
2. Write new module for ejabberd that will monitor message delivery and send some iq stanza to inform the sender. Is it possible? Would it require a lot of work?
Perhaps there are easier ways or already implemented solutions I don't know about? Any help would be welcome.
XEP-0022
I think the easiest way to do that would be to only use clients that implementXEP-0022 fully. This will tell you whenever the recipient's client has received the message. I'm afraid I don't know exactly which clients do this; I only know for sure that jabber.el does and Psi does not.
Or do you mean that this information should be stored on the server? In that case, writing a filter module for ejabberd would probably be the best way, and doable in 20 lines of code. An interface for viewing the information would be more work, though...
XEP-0022
Thank you! XEP-0022 matches well to our needs.
Client support for this extention is not an easy information to find, indeed;)
On the other side server-side implementation would give us wider client choice. I've found support for "offline" event notification in mod_offline module. Could you please point for the best place for "delivered" event notification. I know that doing it server-side is not extention complaint, but we don't need that anyway.
In ejabberd_c2s.erl
Client support for this extention is not an easy information to find, indeed;)
I found that Kopete returns <delivered/> as well. The list is still not complete, though ☺
On the other side server-side implementation would give us wider client choice. I've found support for "offline" event notification in mod_offline module. Could you please point for the best place for "delivered" event notification. I know that doing it server-side is not extention complaint, but we don't need that anyway.
The best place for that would probably be in
ejabberd_c2s.erl
, functionhandle_info/3
, the clause for handlingroute
messages.XEP-0022
I found that Kopete returns <delivered/> as well. The list is still not complete, though ☺
I've made some experiments: most of jabber clients (at least exodus, miranda, soapbox) "passively" support it. "passively" means they reply with notification if sender requets it but do not use "delivered" events themself.
The best place for that would probably be in
ejabberd_c2s.erl
, functionhandle_info/3
, the clause for handlingroute
messages.Боюсь, что в свете нормальной поддержки расширения клиентами, писать модуль для сервера уже не придётся. А жаль, хотелось поближе познакомиться с эрлангом:(. Большое спасибо за помощь!