slidge.core.pubsub#

Module Contents#

Classes#

Attributes#

slidge.core.pubsub.VCARD4_NAMESPACE = urn:xmpp:vcard4[source]#
class slidge.core.pubsub.PepItem(authorized_jid=None)[source]#
Parameters

authorized_jid (Optional[slixmpp.types.JidStr]) –

class slidge.core.pubsub.PepAvatar(authorized_jid=None)[source]#

Bases: PepItem

Parameters

authorized_jid (Optional[slixmpp.types.JidStr]) –

async set_avatar(avatar)[source]#
Parameters

avatar (slidge.util.types.AvatarType) –

class slidge.core.pubsub.PepNick(authorized_jid=None, nick=None)[source]#

Bases: PepItem

Parameters
  • authorized_jid (Optional[slixmpp.types.JidStr]) –

  • nick (Optional[str]) –

slidge.core.pubsub.PepItemType[source]#
class slidge.core.pubsub.PubSubComponent(*a, **kw)[source]#

Bases: slixmpp.plugins.base.BasePlugin

xmpp :slixmpp.ComponentXMPP[source]#
name = pubsub[source]#
description = Pubsub component[source]#
dependencies[source]#
default_config[source]#
component_name :str[source]#
plugin_init()[source]#

Initialize plugin state, such as registering event handlers.

async _on_got_online(p)[source]#
Parameters

p (slixmpp.Presence) –

broadcast_vcard_event(from_, to)[source]#
static _get_authorized_item(store, stanza)[source]#
Parameters
  • store (dict[slixmpp.JID, PepItemType]) –

  • stanza (Union[slixmpp.Iq, slixmpp.Presence]) –

Return type

PepItemType

_get_authorized_avatar(stanza)[source]#
Parameters

stanza (Union[slixmpp.Iq, slixmpp.Presence]) –

_get_authorized_nick(stanza)[source]#
Parameters

stanza (Union[slixmpp.Iq, slixmpp.Presence]) –

async _get_avatar_data(iq)[source]#
Parameters

iq (slixmpp.Iq) –

async _get_avatar_metadata(iq)[source]#
Parameters

iq (slixmpp.Iq) –

async _get_vcard(iq)[source]#
Parameters

iq (slixmpp.Iq) –

static _reply_with_payload(iq, payload, id_, namespace=None)[source]#
Parameters
  • iq (slixmpp.Iq) –

  • payload (Union[slixmpp.plugins.xep_0084.MetaData, slixmpp.plugins.xep_0084.Data, slidge.util.xep_0292.stanza.VCard4]) –

  • id_ (str) –

  • namespace (Optional[str]) –

_broadcast(data, from_, to=None, **kwargs)[source]#
Parameters
  • from_ (slixmpp.types.JidStr) –

  • to (slixmpp.types.OptJidStr) –

async set_avatar(jid, avatar=None, restrict_to=None)[source]#
Parameters
  • jid (slixmpp.types.JidStr) –

  • avatar (Optional[slidge.util.types.AvatarType]) –

  • restrict_to (slixmpp.types.OptJidStr) –

set_nick(jid, nick=None, restrict_to=None)[source]#
Parameters
  • jid (slixmpp.types.JidStr) –

  • nick (Optional[str]) –

  • restrict_to (slixmpp.types.OptJidStr) –

slidge.core.pubsub.log[source]#