Remove protoxep_occupantid
And fix some minor details in 0421 plugin.
This commit is contained in:
parent
c86a6ad299
commit
a245ba54bd
@ -86,6 +86,6 @@ __all__ = [
|
|||||||
'xep_0325', # IoT Systems Control
|
'xep_0325', # IoT Systems Control
|
||||||
'xep_0332', # HTTP Over XMPP Transport
|
'xep_0332', # HTTP Over XMPP Transport
|
||||||
'xep_0377', # Spam reporting
|
'xep_0377', # Spam reporting
|
||||||
|
'xep_0421', # Anonymous unique occupant identifiers for MUCs
|
||||||
'xep_0444', # Message Reactions
|
'xep_0444', # Message Reactions
|
||||||
'protoxep_occupantid', # https://dino.im/xeps/occupant-id.html
|
|
||||||
]
|
]
|
||||||
|
@ -1,12 +0,0 @@
|
|||||||
"""
|
|
||||||
Slixmpp: The Slick XMPP Library
|
|
||||||
Copyright (C) 2019 Mathieu Pasquet
|
|
||||||
This file is part of Slixmpp.
|
|
||||||
|
|
||||||
See the file LICENSE for copying permission.
|
|
||||||
"""
|
|
||||||
from slixmpp.plugins.base import register_plugin
|
|
||||||
from slixmpp.plugins.protoxep_occupantid.occupantid import XEP_OccupantID
|
|
||||||
from slixmpp.plugins.protoxep_occupantid.stanza import OccupantID
|
|
||||||
|
|
||||||
register_plugin(XEP_OccupantID)
|
|
@ -1,23 +0,0 @@
|
|||||||
"""
|
|
||||||
Slixmpp: The Slick XMPP Library
|
|
||||||
Copyright (C) 2019 Mathieu Pasquet
|
|
||||||
This file is part of Slixmpp.
|
|
||||||
|
|
||||||
See the file LICENSE for copying permission.
|
|
||||||
"""
|
|
||||||
from slixmpp.plugins import BasePlugin
|
|
||||||
from slixmpp.stanza import Message, Presence
|
|
||||||
from slixmpp.xmlstream import register_stanza_plugin
|
|
||||||
|
|
||||||
from slixmpp.plugins.protoxep_occupantid import stanza
|
|
||||||
|
|
||||||
|
|
||||||
class XEP_OccupantID(BasePlugin):
|
|
||||||
name = 'protoxep_occupantid'
|
|
||||||
description = 'XEP-XXXX: Anonymous unique occupant identifiers for MUCs'
|
|
||||||
dependencies = set()
|
|
||||||
stanza = stanza
|
|
||||||
|
|
||||||
def plugin_init(self):
|
|
||||||
register_stanza_plugin(Message, stanza.OccupantID)
|
|
||||||
register_stanza_plugin(Presence, stanza.OccupantID)
|
|
@ -1,16 +0,0 @@
|
|||||||
"""
|
|
||||||
Slixmpp: The Slick XMPP Library
|
|
||||||
Copyright (C) 2019 Mathieu Pasquet
|
|
||||||
This file is part of Slixmpp.
|
|
||||||
|
|
||||||
See the file LICENSE for copying permission.
|
|
||||||
"""
|
|
||||||
|
|
||||||
from slixmpp.xmlstream import ElementBase
|
|
||||||
|
|
||||||
|
|
||||||
class OccupantID(ElementBase):
|
|
||||||
name = 'occupant-id'
|
|
||||||
plugin_attrib = 'occupant-id'
|
|
||||||
namespace = 'urn:xmpp:occupant-id:0'
|
|
||||||
interfaces = {'id'}
|
|
@ -6,7 +6,7 @@
|
|||||||
See the file LICENSE for copying permission.
|
See the file LICENSE for copying permission.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from slixmpp import JID, Message
|
from slixmpp import JID, Message, Presence
|
||||||
from slixmpp.plugins import BasePlugin
|
from slixmpp.plugins import BasePlugin
|
||||||
from slixmpp.xmlstream import register_stanza_plugin
|
from slixmpp.xmlstream import register_stanza_plugin
|
||||||
from slixmpp.plugins.xep_0421 import stanza
|
from slixmpp.plugins.xep_0421 import stanza
|
||||||
@ -25,6 +25,7 @@ class XEP_0421(BasePlugin):
|
|||||||
def plugin_init(self) -> None:
|
def plugin_init(self) -> None:
|
||||||
# XXX: This should be MucMessage. Someday..
|
# XXX: This should be MucMessage. Someday..
|
||||||
register_stanza_plugin(Message, OccupantId)
|
register_stanza_plugin(Message, OccupantId)
|
||||||
|
register_stanza_plugin(Presence, OccupantId)
|
||||||
|
|
||||||
async def has_feature(self, jid: JID) -> bool:
|
async def has_feature(self, jid: JID) -> bool:
|
||||||
info = await self.xmpp['xep_0030'].get_info(jid)
|
info = await self.xmpp['xep_0030'].get_info(jid)
|
||||||
|
@ -36,5 +36,6 @@ class OccupantId(ElementBase):
|
|||||||
'''
|
'''
|
||||||
|
|
||||||
name = 'occupant-id'
|
name = 'occupant-id'
|
||||||
|
plugin_attrib = 'occupant-id'
|
||||||
namespace = NS
|
namespace = NS
|
||||||
interface = {'id'}
|
interface = {'id'}
|
||||||
|
Loading…
Reference in New Issue
Block a user