Make hook lookup workx
This commit is contained in:
parent
447361ace7
commit
0c4b224605
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user