karthikindia / emite

Automatically exported from code.google.com/p/emite
0 stars 0 forks source link

Add support for delayed delivery #316

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Delayed delivery allows to send events (such as messages when offline, messages 
in group chats, delayed presences) much after their time of execution.
The implementation allows to show a correct timestamp of the event, while now 
we have no timestamp at all (with the exception of the current timestamp).

References:
http://xmpp.org/extensions/xep-0203.html
http://xmpp.org/extensions/xep-0091.html (obsolete)

XEP-0203 is implemented by ejabberd (since 2.1.0) and Openfire 3.7.0
XEP-0091 is implemented by Openfire 3.6.4.

Original issue reported on code.google.com by antonio....@gmail.com on 3 Sep 2010 at 1:50

GoogleCodeExporter commented 8 years ago
Nice one. Any thoughts about how implement it and what are the consecuences 
(either on emite and hablar)?

A related (and necessary) xep: http://xmpp.org/extensions/xep-0082.html

Original comment by danigb on 3 Sep 2010 at 1:58

GoogleCodeExporter commented 8 years ago
I think that a Delay class should be created, containing a Date object (the 
timestamp) and two strings ("from" and the source, the latter can be null).
Then in all classes that may have a delay there should be a "getDelay" method.
About the date/time profile, I will investigate more.

Thanks

Original comment by antonio....@gmail.com on 3 Sep 2010 at 2:08

GoogleCodeExporter commented 8 years ago

Original comment by antonio....@gmail.com on 9 Sep 2010 at 9:33

GoogleCodeExporter commented 8 years ago

Original comment by antonio....@gmail.com on 9 Sep 2010 at 12:28

GoogleCodeExporter commented 8 years ago
This issue was closed by revision r1636.

Original comment by antonio....@gmail.com on 14 Sep 2010 at 3:58

GoogleCodeExporter commented 8 years ago
I reopen due to bad application of delay management.
It should be implemented in a different module, as described by the comment of 
r1636.

Original comment by antonio....@gmail.com on 15 Sep 2010 at 8:24

GoogleCodeExporter commented 8 years ago
DelayedManager need to modify *any* stanza (*typically* a <message/> or a 
<presence/>) before send. To do that, it will use the (not yet created) 
addBeforeSendStanzaHandler method.

Original comment by danigb on 15 Sep 2010 at 8:45

GoogleCodeExporter commented 8 years ago
This issue was closed by revision r1638.

Original comment by antonio....@gmail.com on 15 Sep 2010 at 10:51

GoogleCodeExporter commented 8 years ago
Modify? The "delay" element is available on when receiving stanzas, IOW you 
cannot send a message in the past :-D
Anyway in the last commit I moved everything in a different module, but I did 
not add any static method, because I did not see them in other places.
I will use the ginjector directly where it is needed (e.g. RoomPresenter in 
Hablar). After all isn't it the main purpose of a Dependency Injection 
framework? :-P

Original comment by antonio....@gmail.com on 15 Sep 2010 at 10:54