{"id":13739065,"url":"https://github.com/xmppjs/hubot-xmpp","last_synced_at":"2025-04-07T07:10:50.899Z","repository":{"id":509104,"uuid":"2769757","full_name":"xmppjs/hubot-xmpp","owner":"xmppjs","description":"XMPP adapter for Hubot","archived":false,"fork":false,"pushed_at":"2022-12-30T19:16:36.000Z","size":982,"stargazers_count":181,"open_issues_count":26,"forks_count":101,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-03-31T05:08:03.111Z","etag":null,"topics":["hubot","hubot-adapter","xmpp"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xmppjs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-11-14T02:59:50.000Z","updated_at":"2024-10-26T05:35:42.000Z","dependencies_parsed_at":"2023-01-11T15:28:08.839Z","dependency_job_id":null,"html_url":"https://github.com/xmppjs/hubot-xmpp","commit_stats":null,"previous_names":["markstory/hubot-xmpp"],"tags_count":32,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xmppjs%2Fhubot-xmpp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xmppjs%2Fhubot-xmpp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xmppjs%2Fhubot-xmpp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xmppjs%2Fhubot-xmpp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xmppjs","download_url":"https://codeload.github.com/xmppjs/hubot-xmpp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247608151,"owners_count":20965952,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hubot","hubot-adapter","xmpp"],"created_at":"2024-08-03T04:00:24.271Z","updated_at":"2025-04-07T07:10:50.879Z","avatar_url":"https://github.com/xmppjs.png","language":"JavaScript","funding_links":[],"categories":["Adapters","📦 Legacy \u0026 Inactive Projects"],"sub_categories":[],"readme":"# Hubot XMPP\n\nConnects Hubot to your XMPP network\n\n[![Build Status](https://secure.travis-ci.org/xmppjs/hubot-xmpp.png?branch=master)](http://travis-ci.org/xmppjs/hubot-xmpp)\n\n## Setup\n\nInstall dependencies with `npm`\n\n\tnpm install\n\n## Configuration\n\nThere are a few configuration values you can use when getting hubot-xmpp\nrunning. The XMPP adapter requires only 3 (5 if you need specify server\nand port) environment variables to be set to able to use it.\n\n* `HUBOT_XMPP_USERNAME`\n* `HUBOT_XMPP_PASSWORD`\n* `HUBOT_XMPP_ROOMS`\n\nOptional:\n\n* `HUBOT_XMPP_HOST` The host name you want to connect to if its different than\n  what is in the username jid.\n* `HUBOT_XMPP_PORT` The port to connect to on the jabber server.\n* `HUBOT_XMPP_LEGACYSSL` Set to 1 to enable legacy SSL port.  This requires\n  the host to be defined.\n* `HUBOT_XMPP_PREFERRED_SASL_MECHANISM` Used to change the encoding used for SASL.\n* `HUBOT_XMPP_DISALLOW_TLS` Prevent upgrading the connection to a secure one via TLS.\n* `HUBOT_XMPP_PM_ADD_PREFIX` Make commands work in PMs to hubot without robot name/alias.\n* `HUBOT_XMPP_KEEPALIVE_INTERVAL` Keep-alive interval in ms.\n* `HUBOT_XMPP_RECONNECT_TRY` the number of reconnect retry in case of disconnection, default is 5.\n* `HUBOT_XMPP_RECONNECT_WAIT` the time in ms to wait before reconnecting, default is 5000.\n\n`HUBOT_XMPP_ROOMS` can be a comma separated list of rooms to join.  If\nyour rooms require passwords you should use the `jid:password` syntax.\nRoom passwords cannot contain `,`. Room names must be the full jid of the\nroom for example `dev@conference.jabber.example.org`.\n\n`HUBOT_XMPP_PM_ADD_PREFIX` works by prefixing the private message with hubot name, so a\nside effect is that the bot ignores commands of type `/^command/i`.\n\n## Installation\n\nCreate a standalone hubot with xmpp adapter:\n\n```sh\nmkdir -p ./my-bot\ncd ./my-bot\nnpx -p yo -p generator-hubot -c 'yo hubot --adapter=xmpp'\n```\n\nSee also https://hubot.github.com/docs/ .\n\n## Group chat vs private JID\n\nThe jabber protocol does not broadcast real user JID in groupchat presence\nstanzas unless the server/chat room is configured to do so.\n\nIf you need to send private chat in response to a groupchat message, use\nhubot's send method with the groupchat jid and `envelope.user.type = 'direct'`.\nhubot-xmpp will then automatically resolve the JID to a private\nchat JID, and private message the sender.\n\nIf you need to get the private chat JID, you can use\n`msg.envelope.user.privateChatJid` where `msg` is the parameter of hubot's\n`route` callback.\n\nExample:\n\n```js\nrobot.respond(/talk to me$/i, msg =\u003e {\n  // Simply reply\n  msg.reply(`Hello ${msg.envelope.user.name}. Your private JID is ${msg.envelope.user.privateChatJID}`);\n});\n\nrobot.respond(/talk to me in private$/i, msg =\u003e {\n  msg.envelope.user.type = 'direct';\n  msg.send(`Hey ${msg.envelope.user.name}! You told me in room ${msg.envelope.user.room} to talk to you.`);\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxmppjs%2Fhubot-xmpp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxmppjs%2Fhubot-xmpp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxmppjs%2Fhubot-xmpp/lists"}