fork of https://f-hub.org/XMPP/xmpp-discord-bridge

Use slixmpp branch with join_muc fix

+7 -9
+1 -1
README.md
··· 50 50 51 51 # When sending files from Discord to XMPP, proxy the URLS with this template. "<hmac>" and 52 52 # and "<url>" will be substituted. Proxy will not be used if not set. 53 - proxy_discord_urls_to = "https://proxy.server.example/proxy/<hmac>/<urls>" 53 + proxy_discord_urls_to = "https://proxy.server.example/proxy/<hmac>/<url>" 54 54 55 55 # Secret for the proxy. Only used when the proxy is used. 56 56 hmac_secret = "some-secret"
+1 -1
setup.py
··· 10 10 packages = find_packages(), 11 11 install_requires = [ 12 12 "requests==2.27.1", 13 - "slixmpp==1.8.6", 13 + "slixmpp @ git+https://codeberg.org/poezio/slixmpp.git@fix-muc-join", 14 14 "nextcord", 15 15 "toml==0.10.2" 16 16 ],
+5 -7
xmpp_discord_bridge/main.py
··· 154 154 presence_options = PresenceArgs( 155 155 pfrom=self._bot_jid_full, 156 156 ) 157 - self.send_presence() 158 - await self.plugin["xep_0045"].join_muc_wait(muc, 157 + self.plugin["xep_0045"].make_join_stanza(muc, 159 158 nick=self._bot_nick, 160 - presence_options=presence_options, 161 - timeout=10) 159 + presence_options=presence_options).send() 162 160 self._logger.info("Joined %s as %s", muc, self._bot_jid_full) 163 161 164 162 # Set the subject ··· 317 315 pshow=pshow, 318 316 pstatus=pstatus 319 317 ) 320 - await self.plugin["xep_0045"].join_muc_wait(muc, 318 + self.plugin["xep_0045"].make_join_stanza(muc, 321 319 nick=self._config["general"]["discord2xmpp_name_fmt"].format( 322 320 display_name=member.display_name 323 321 ), 324 - presence_options=presence) 322 + presence_options=presence).send() 325 323 326 324 async def on_discord_member_join(self, member): 327 325 guild = member.guild.id ··· 537 535 for xep in [ 538 536 "0030", 539 537 "0199", 540 - "0045", 541 538 "0084", 542 539 "0153", 543 540 "0054", 544 541 "0060" 545 542 ]: 546 543 xmpp.register_plugin(f"xep_{xep}") 544 + xmpp.register_plugin("xep_0045", {"multi_from": True}) 547 545 548 546 logging.basicConfig(stream=sys.stdout, level=verbosity) 549 547