Bump to 1.3.1
[slixmpp.git] / sleekxmpp / plugins / xep_0203 / delay.py
blob31f31ce33526d6d208673ee625760c78e17b6336
1 """
2 SleekXMPP: The Sleek XMPP Library
3 Copyright (C) 2011 Nathanael C. Fritz, Lance J.T. Stout
4 This file is part of SleekXMPP.
6 See the file LICENSE for copying permission.
7 """
10 from sleekxmpp.stanza import Message, Presence
11 from sleekxmpp.xmlstream import register_stanza_plugin
12 from sleekxmpp.plugins import BasePlugin
13 from sleekxmpp.plugins.xep_0203 import stanza
16 class XEP_0203(BasePlugin):
18 """
19 XEP-0203: Delayed Delivery
21 XMPP stanzas are sometimes withheld for delivery due to the recipient
22 being offline, or are resent in order to establish recent history as
23 is the case with MUCS. In any case, it is important to know when the
24 stanza was originally sent, not just when it was last received.
26 Also see <http://www.xmpp.org/extensions/xep-0203.html>.
27 """
29 name = 'xep_0203'
30 description = 'XEP-0203: Delayed Delivery'
31 dependencies = set()
32 stanza = stanza
34 def plugin_init(self):
35 """Start the XEP-0203 plugin."""
36 register_stanza_plugin(Message, stanza.Delay)
37 register_stanza_plugin(Presence, stanza.Delay)