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

Use slixmpp branch with join_muc fix

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