Merge branch 'remove-protoxep-occupantid' into 'master'

Remove protoxep_occupantid

See merge request poezio/slixmpp!65
This commit is contained in:
Link Mauve 2020-11-27 20:03:41 +01:00
commit 086dc894d1
6 changed files with 4 additions and 53 deletions

View file

@ -86,6 +86,6 @@ __all__ = [
'xep_0325', # IoT Systems Control
'xep_0332', # HTTP Over XMPP Transport
'xep_0377', # Spam reporting
'xep_0421', # Anonymous unique occupant identifiers for MUCs
'xep_0444', # Message Reactions
'protoxep_occupantid', # https://dino.im/xeps/occupant-id.html
]

View file

@ -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)

View file

@ -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)

View file

@ -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'}

View file

@ -6,7 +6,7 @@
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.xmlstream import register_stanza_plugin
from slixmpp.plugins.xep_0421 import stanza
@ -25,6 +25,7 @@ class XEP_0421(BasePlugin):
def plugin_init(self) -> None:
# XXX: This should be MucMessage. Someday..
register_stanza_plugin(Message, OccupantId)
register_stanza_plugin(Presence, OccupantId)
async def has_feature(self, jid: JID) -> bool:
info = await self.xmpp['xep_0030'].get_info(jid)

View file

@ -36,5 +36,6 @@ class OccupantId(ElementBase):
'''
name = 'occupant-id'
plugin_attrib = 'occupant-id'
namespace = NS
interface = {'id'}