Move XEP-0184 to new system.
This commit is contained in:
parent
34a7a62c35
commit
17279de4a3
@ -6,5 +6,14 @@
|
|||||||
See the file LICENSE for copying permission.
|
See the file LICENSE for copying permission.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
from sleekxmpp.plugins.base import register_plugin
|
||||||
|
|
||||||
from sleekxmpp.plugins.xep_0184.stanza import Request, Received
|
from sleekxmpp.plugins.xep_0184.stanza import Request, Received
|
||||||
from sleekxmpp.plugins.xep_0184.reciept import xep_0184
|
from sleekxmpp.plugins.xep_0184.reciept import XEP_0184
|
||||||
|
|
||||||
|
|
||||||
|
register_plugin(XEP_0184)
|
||||||
|
|
||||||
|
|
||||||
|
# Retain some backwards compatibility
|
||||||
|
xep_0184 = XEP_0184
|
||||||
|
@ -8,25 +8,25 @@
|
|||||||
|
|
||||||
from sleekxmpp.stanza import Message
|
from sleekxmpp.stanza import Message
|
||||||
from sleekxmpp.xmlstream import register_stanza_plugin
|
from sleekxmpp.xmlstream import register_stanza_plugin
|
||||||
from sleekxmpp.plugins.base import base_plugin
|
from sleekxmpp.plugins import BasePlugin
|
||||||
from sleekxmpp.plugins.xep_0184 import stanza, Request, Received
|
from sleekxmpp.plugins.xep_0184 import stanza, Request, Received
|
||||||
|
|
||||||
|
|
||||||
class xep_0184(base_plugin):
|
class XEP_0184(BasePlugin):
|
||||||
|
|
||||||
"""
|
"""
|
||||||
XEP-0184: Message Delivery Receipts
|
XEP-0184: Message Delivery Receipts
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def plugin_init(self):
|
name = 'xep_0184'
|
||||||
self.xep = '0184'
|
description = 'XEP-0184: Message Delivery Receipts'
|
||||||
self.description = 'Message Delivery Receipts'
|
dependencies = set(['xep_0030'])
|
||||||
self.stanza = stanza
|
stanza = stanza
|
||||||
|
|
||||||
|
def plugin_init(self):
|
||||||
register_stanza_plugin(Message, Request)
|
register_stanza_plugin(Message, Request)
|
||||||
register_stanza_plugin(Message, Received)
|
register_stanza_plugin(Message, Received)
|
||||||
|
|
||||||
def post_init(self):
|
|
||||||
base_plugin.post_init(self)
|
|
||||||
self.xmpp.plugin['xep_0030'].add_feature('urn:xmpp:receipts')
|
self.xmpp.plugin['xep_0030'].add_feature('urn:xmpp:receipts')
|
||||||
|
|
||||||
def ack(self, message):
|
def ack(self, message):
|
||||||
|
Loading…
Reference in New Issue
Block a user