{"id":15147021,"url":"https://github.com/ventureoo/jabagram","last_synced_at":"2025-10-24T01:31:25.314Z","repository":{"id":203765492,"uuid":"710007123","full_name":"ventureoo/jabagram","owner":"ventureoo","description":"Fully functional bridge between Telegram and XMPP","archived":false,"fork":false,"pushed_at":"2024-08-26T17:09:59.000Z","size":222,"stargazers_count":8,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-09-26T12:21:49.749Z","etag":null,"topics":["bridge","python","slixmpp","telegram","xmpp"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ventureoo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-10-25T20:20:51.000Z","updated_at":"2024-08-26T17:10:02.000Z","dependencies_parsed_at":"2023-11-21T17:29:02.650Z","dependency_job_id":"cd3418da-3500-4496-a185-de4fd481dee7","html_url":"https://github.com/ventureoo/jabagram","commit_stats":{"total_commits":67,"total_committers":3,"mean_commits":"22.333333333333332","dds":0.02985074626865669,"last_synced_commit":"a5c15191e76d2644d6c497baf33de9473989b2e0"},"previous_names":["ventureoo/jabagram"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ventureoo%2Fjabagram","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ventureoo%2Fjabagram/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ventureoo%2Fjabagram/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ventureoo%2Fjabagram/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ventureoo","download_url":"https://codeload.github.com/ventureoo/jabagram/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219867198,"owners_count":16555821,"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":["bridge","python","slixmpp","telegram","xmpp"],"created_at":"2024-09-26T12:21:26.919Z","updated_at":"2025-10-24T01:31:25.308Z","avatar_url":"https://github.com/ventureoo.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# jabagram\n\nA lightweight and fast, full-featured bridge between XMPP and Telegram. Was\noriginally written for personal use, so may not be very flexible in\nconfiguration.\n\n\u003cp align=\"center\" width=\"100%\"\u003e\n\u003cimg width=\"35%\" src=\"https://github.com/ventureoo/jabagram/assets/92667539/91646d1d-bee8-40e0-ad9a-071d2d4431b9\"\u003e \n\u003cimg width=\"35%\" src=\"https://github.com/ventureoo/jabagram/assets/92667539/1d74e64f-541d-4aa2-8913-2f43fcf06182\"\u003e \n\u003c/p\u003e\n\n## Features\n\nThis bridge has the following features and supports all the basic capabilities:\n\n- [x] Lightweight and asynchronous, with support for adding new chats in runtime, without config editing\n- [x] Unlike other bridges, it doesn't require hosting your own XMPP server\n- [x] Forwarding between multiple pairs of chats at once instance (see below for usage)\n- [x] Forwarding of plain text messages\n- [x] Forwarding of attachments (videos, images, audio, etc)\n- [x] Stickers (from Telegram -\u003e XMPP)\n- [x] Native replies to messages in Telegram\n- [x] Round-trip message edit changes\n- [x] Forwards events between bridged chats, such as mebmers join/exit, etc.\n\n\n## Installation\n\n### With pip\n\nJabagram stable releases can now be installed via pip. This is the recommended\nway if you don't want to use Docker or unable to install jabagram dependencies\nto your system paths.\n\n```\npip install --user jabagram\n```\n\nYou can also install in a virtual environment if you don't want to clutter your\nsystem with all the jabagram dependencies.\n\n### Manual\n\nWhen manually installing to make the bridge work, you need to use Python 3.10+,\nand install all the dependencies specified in the ``requirements.txt``(slixmpp\n1.9.0+, aiohttp) file:\n\n```\ngit clone https://github.com/ventureoo/jabagram\ncd jabagram\npip install -r requirements.txt\npip install -e .\n```\n\nAfter manual installation you can start bridge with the following command:\n\n```\npython -m jabagram.runner\n```\n\n## Deploy\n\nBefore you start the bridge, you need to do some basic configuration. An\nexample configuration is given in the form of the file ``config.example.ini``.\nRename it to ``config.ini`` and specify the following data:\n\n1) Create a bot in Telegram via @botfather on behalf of which messages will be\nforwarded and specify its token in the ``token`` field of the ``[telegram]``\nsection.\n2) Create an XMPP account on behalf of which the bridge will forward messages\nin MUC rooms, specify its JID (login) and password in the ``login`` and\n``password`` fields in the ``[xmpp]`` section respectively.\n3) Come up with a secret key that will be used when linking new Telegram and\nXMPP chats. This key must be passed as a reason to invite a bot in XMPP to the\nMUC room, otherwise the bot will not accept the invitation. This is a security\nmeasure if you don't want your bridge instance to be used to bind other chats.\nOtherwise, leave this field blank.\n4) If you have done everything correctly, the bridge should start without\nerrors or exceptions and will create a database ``jabagram.db`` inside data\nfolder, which will store information about the \"bound\" chats in Telegram and XMPP.\nSee Usage further below.\n\nAn example of a config file that is given as ``config.example.ini``:\n\n```\n# Telegram bot token, get it from @botfather\n[telegram]\ntoken=XXXXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n\n# Login and password from the bot account in XMPP\n[xmpp]\nlogin=your_xmpp_user@example.org\npassword=YoUr_SEcReT_PaSs\n\n# The secret key specified in the user's invitation to the MUC for linking two\n# chats. PLEASE change it from the default key if you don't want your bridge\n# instance to be used by whoever you want. Otherwise, leave it blank.\n[general]\nkey=SUxvdmVYTVBQ\n\n# Further on is the service messages that are sent by a bot\n[messages.missing_muc_jid]\nline = Please specify the MUC address of room you want to pair with this Telegram chat.\n\n[messages.invalid_jid]\nline = You have specified an incorrect room JID. Please try again.\n\n[messages.queueing_message]\nline.1 = Specified room has been successfully placed on the queue.\nline.2 = Please invite this {} bot to your XMPP room, and as the reason for the invitation specify the secret key that is specified in bot's config or ask the owner of this bridge instance for it.\nline.3 = If you have specified an incorrect room address, simply repeat\nline.4 = the pair command (/jabagram) with the corrected address.\n\n[messages.unbridge_telegram]\nline.1 = This chat was automatically unbridged due to a bot kick in XMPP.\nline.2 = If you want to bridge it again, invite this bot to this chat again and use the /jabagram command.\n\n[messages.unbridge_xmpp]\nline.1 = This chat was automatically unbridged due to a bot kick in Telegram.\n```\n\n### Via Docker\n\nYou can also use Docker to deploy the bridge. Here you don't need to\npre-install dependencies on the host system, just build a container image:\n\n```\ngit clone https://github.com/ventureoo/\ncd jabagram\ndocker buildx build --restart always -t jabagram .\n```\n\nYou should also create a data directory to store your database and bridge\nconfiguration outside of the container environment:\n\n```\nmkdir -p ./data\ncp -v config.ini data\n```\n\nThe following command is used to start it:\n\n```\ndocker run --restart always -d --name jabagram -v \"$PWD/data:/data:rw\" jabagram\n```\n\nNote about the ``-v`` key. It specifies that the database file be stored\noutside the container environment, i.e. on your host system. The ``--restart``\noption is needed if you want the bridge to automatically restart on critical\nerrors or when your system is powered on.\n\n## Usage\n\nOnce you have successfully started your own bridge instance or found an\nexisting one, you can perform chat binding using the following algorithm:\n\n1. Invite your bot to the Telegram chat you want to bridge.\n2. Run the ``/jabagram`` command with the MUC address of the room you want to\n   bridge.\n   1. If the address was entered incorrectly, simply repeat the command with\n      the corrected address.\n3. The bot will queue your chats and then wait for you to invite the bot into\n   the XMPP room.\n4. Invite the XMPP bot into the room and as a reason, specify the secret key\n   that you previously specified in the config or received from the admin of an\n   existing instance. For example, in the Gajim client, this is done with the\n   command: ``/invite \u003cXMPP_JID\u003e \u003cSECRET_KEY\u003e``\n5. Once the bot successfully joins an XMPP room, messages should be sent\n   between your room and the chat room in Telegram.\n\nIf you want to \"unbridge\" chats, just kick the bot from your Telegram chat or\nXMPP room. It will automatically remove the entry from the database. Note that\nlosing the ``./data/jabagram.db`` file will unbridge all chats and you will need to\nre-bridge them.\n\nTo re-bridge chats follow the steps above.\n\n### Limitations\n\nThis bridge has some limitation that will probably never be properly fixed.\n\n#### OMEMO encryption\n\nThis bridge cannot forward messages that have been encrypted using OMEMO or\nOpenPGP. This will never be implemented because:\n\n1) slixmpp does not support encryption via OMEMO \n2) Forwarding encrypted messages is probably a bad idea in the first place, you\nare actually passing the body of your message unencrypted to the Telegram API,\nit will be visible to all Telegram chat members to see it. Which calls into\nquestion the whole point of encrypting messages.\n\n#### Deleting messages\n\nBridge cannot delete a forwarded message in XMPP if it has been deleted in\nTelegram. The Telegram API doesn't allow the bot to receive any updates about\ndeleted messages, so this simply can't be implemented. In the case of XMPP,\nmessage deletion is a feature that can only be implemented on the client side,\nnot at the protocol or XEP level. Use editing of message with a stub as a\nworkaround.\n\n#### Animated stickers from Telegram\n\nTelegram has a proprietary format for animated stickers that probably can't be\nproperly previewed by XMPP clients. The bridge will not forward them to XMPP\nbecause they cannot be properly rendered in any XMPP client.\n\n#### Forwarding private messages\n\nSorry, but at the moment I only want to support forwarding messages from group\nchats or MUCs. But this may be implemented in the future.\n\n#### Mobile XMPP clients don't show nicknames set by the bot in MUC\n\nSome mobile clients like Conversations and Blabber don't show nicknames in MUC\nfor users you have in your contacts [1]. Please, after inviting a bot to XMPP,\nmake sure you remove it from your contacts, otherwise it will not accept\nTelegram sender nicknames for you.\n\n[1] - https://codeberg.org/iNPUTmice/Conversations/commit/ef1429c9a6983c101da41a277bd9353374dc89e7\n\n## License\n\nLicensed under GPL 3.0. If you'd like to help with improvements or fixes to this shitty code, I'd be happy to consider your patches ;D\n\n## Feedback\n\nIf you have any issues with how the bridge works/is configured, please use\n\"Discussions\" tab on the GitHub.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fventureoo%2Fjabagram","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fventureoo%2Fjabagram","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fventureoo%2Fjabagram/lists"}