Compare commits

..

No commits in common. "757976c8f6c73da5798a2d73dbec5863ff11df50" and "d1a1946b4bd33036ca0d92ad7f5e77bd7d3df24e" have entirely different histories.

2 changed files with 5 additions and 17 deletions

View File

@ -9,10 +9,10 @@ setup(
license = "GPLc3", license = "GPLc3",
packages = find_packages(), packages = find_packages(),
install_requires = [ install_requires = [
"requests==2.27.1", "requests>=2.26.0",
"slixmpp==1.7.1", "slixmpp>=1.7.1",
"nextcord", "nextcord",
"toml==0.10.2" "toml>=0.10.2"
], ],
extra_require = { extra_require = {
"dev": [ "dev": [

View File

@ -206,11 +206,7 @@ class BridgeComponent(ComponentXMPP):
wh = None wh = None
for webhook in await dchannel.webhooks(): for webhook in await dchannel.webhooks():
if webhook.name == "discord-xmpp-bridge": if webhook.name == "discord-xmpp-bridge":
if not webhook.is_authenticated(): wh = webhook
_logger.info("Webhook for %s has no token. Deleting and recreating" % muc)
await webhook.delete(reason="Webhook has no token. Will recreate")
else:
wh = webhook
break break
if not wh: if not wh:
wh = await dchannel.create_webhook(name="discord-xmpp-bridge", wh = await dchannel.create_webhook(name="discord-xmpp-bridge",
@ -530,15 +526,7 @@ def main():
general["port"], general["port"],
general["discord_token"], general["discord_token"],
config) config)
for xep in [ for xep in [ "0030", "0199", "0045", "0084", "0153", "0054", "0060" ]:
"0030",
"0199",
"0045",
"0084",
"0153",
"0054",
"0060"
]:
xmpp.register_plugin(f"xep_{xep}") xmpp.register_plugin(f"xep_{xep}")
logging.basicConfig(stream=sys.stdout, level=verbosity) logging.basicConfig(stream=sys.stdout, level=verbosity)