xmpp_channel
xmpp_channel
¶
XMPPChannel — XMPP/Jabber adapter via slixmpp.
Classes¶
XMPPChannel
¶
XMPPChannel(
jid: str = "",
*,
password: str = "",
server: str = "",
port: int = 5222,
bus: Optional[EventBus] = None,
)
Bases: BaseChannel
XMPP (Jabber) messaging channel adapter.
Uses the XMPP protocol via slixmpp.
| PARAMETER | DESCRIPTION |
|---|---|
jid
|
XMPP JID (e.g.
TYPE:
|
password
|
XMPP account password. Falls back to
TYPE:
|
server
|
Optional XMPP server hostname override. Falls back to
TYPE:
|
port
|
XMPP server port (default 5222). Falls back to
TYPE:
|
bus
|
Optional event bus for publishing channel events.
TYPE:
|
Source code in src/diapason/channels/xmpp_channel.py
Methods:¶
connect
¶
Validate credentials and mark as connected.
Source code in src/diapason/channels/xmpp_channel.py
disconnect
¶
send
¶
send(
channel: str,
content: str,
*,
conversation_id: str = "",
metadata: Dict[str, Any] | None = None,
) -> bool
Send an XMPP message.
| PARAMETER | DESCRIPTION |
|---|---|
channel
|
Recipient JID (user or MUC room).
TYPE:
|
content
|
Text message content.
TYPE:
|
Source code in src/diapason/channels/xmpp_channel.py
status
¶
status() -> ChannelStatus