Make hook lookup workx
This commit is contained in:
parent
d577758fce
commit
447361ace7
@ -41,9 +41,15 @@ def webhook_receiver(id):
|
||||
# Process the data and perform actions based on the event
|
||||
print("Received webhook data:", data)
|
||||
|
||||
target = hooks.get(id)
|
||||
print(target)
|
||||
sendmessage(target, data.get('message'))
|
||||
target = None
|
||||
for key, value in hooks.items():
|
||||
print("%s/%s" % (str(key), str(id)))
|
||||
if key == id:
|
||||
target = value
|
||||
|
||||
if target is not None:
|
||||
print(target)
|
||||
sendmessage(target, data.get('message'))
|
||||
|
||||
return jsonify({'message': 'Webhook received successfully'}), 200
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user