Make hook lookup workx
This commit is contained in:
parent
447361ace7
commit
0c4b224605
@ -43,13 +43,14 @@ def webhook_receiver(id):
|
|||||||
|
|
||||||
target = None
|
target = None
|
||||||
for key, value in hooks.items():
|
for key, value in hooks.items():
|
||||||
print("%s/%s" % (str(key), str(id)))
|
if str(key) == str(id):
|
||||||
if key == id:
|
|
||||||
target = value
|
target = value
|
||||||
|
|
||||||
if target is not None:
|
if target is not None:
|
||||||
print(target)
|
print(target)
|
||||||
sendmessage(target, data.get('message'))
|
sendmessage(target, data.get('message'))
|
||||||
|
else:
|
||||||
|
print("No target found, dropping message")
|
||||||
|
|
||||||
return jsonify({'message': 'Webhook received successfully'}), 200
|
return jsonify({'message': 'Webhook received successfully'}), 200
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user