Make hook lookup workx

This commit is contained in:
Guy Van Sanden 2025-02-04 17:49:19 +01:00
parent 447361ace7
commit 0c4b224605

View File

@ -43,13 +43,14 @@ def webhook_receiver(id):
target = None
for key, value in hooks.items():
print("%s/%s" % (str(key), str(id)))
if key == id:
if str(key) == str(id):
target = value
if target is not None:
print(target)
sendmessage(target, data.get('message'))
else:
print("No target found, dropping message")
return jsonify({'message': 'Webhook received successfully'}), 200