6 Commits
Author SHA1 Message Date
raucao 0253166f25 Log stack traces for XMPP client errors
test / test (push) Successful in 12s
2026-10-28 15:50:29 +04:00
raucao c2c460fe30 Add Gitea Actions workflow to run tests on Node 22
test / test (push) Successful in 10s
2026-10-28 00:06:23 +04:00
raucao 9b40ad7ab9 Resolve XMPP host from JID domain and set TLS SNI
Make HUBOT_XMPP_HOST optional: when unset, pass the bare JID domain as the
service so @xmpp/client resolves the host via DNS SRV (XEP-0368) and the
XEP-0156 well-known file. HUBOT_XMPP_PORT now only applies together with HOST.

xmpp.js does not set TLS SNI, and @xmpp/resolve connects to raw IPs from SRV/A
lookups, so direct TLS failed certificate verification
(ERR_TLS_CERT_ALTNAME_INVALID) and silently fell back to STARTTLS. Wrap the
transport socketParameters to set servername to the JID domain (XEP-0368 §3
rule 6), mirroring xmppjs/xmpp.js#1128 and the sockethub workaround. Direct TLS
now succeeds on the first try.
2026-10-27 18:30:18 +04:00
raucao 44bae5649e Track MUC occupants from presence instead of disco#items
XEP-0045 §6.5 lets a room keep its occupant list private (deployments are
advised to disable it), so disco#items is unreliable for non-admin
accounts. Occupants are instead tracked from the occupant presence
broadcast the service sends after a join (XEP-0045 §7.1/§7.2.2).

- getUsersInRoom() now returns nicks observed via occupant presence,
  excluding the bot itself
- track occupants on available presence, including the initial roster
  which arrives before our own self-presence; untrack on unavailable
- clear tracked occupants on leaveRoom()
2026-10-27 18:09:14 +04:00
raucao fbf9df6b18 Update LICENSE 2026-10-27 17:59:37 +04:00
raucao 1ac2ef3667 Add modern hubot 14 XMPP adapter on @xmpp/client
Port the old node-xmpp-client based adapter (xmppjs/hubot-xmpp 0.3.0) to
hubot 14 (ESM) using @xmpp/client 0.14:

- default `{ use }` entrypoint matching hubot 14's adapter loader
- MUC join/leave, groupchat and private chat handling, presence tracking
  (enter/leave, role, private JID mapping)
- keepalive pings; reconnection via @xmpp/client's built-in reconnect
- XHTML payload support via the @xmpp/xml parser
- node:test suite (45 tests)

Drops legacy options no longer applicable to @xmpp/client:
HUBOT_XMPP_LEGACYSSL, _PREFERRED_SASL_MECHANISM, _DISALLOW_TLS,
_RECONNECT_TRY, _RECONNECT_WAIT and HUBOT_XMPP_UUID_ON_JOIN.
2026-10-27 17:40:17 +04:00