Make hook lookup workx
This commit is contained in:
		
							parent
							
								
									d577758fce
								
							
						
					
					
						commit
						447361ace7
					
				@ -41,7 +41,13 @@ def webhook_receiver(id):
 | 
				
			|||||||
    # Process the data and perform actions based on the event
 | 
					    # Process the data and perform actions based on the event
 | 
				
			||||||
    print("Received webhook data:", data)
 | 
					    print("Received webhook data:", data)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    target = hooks.get(id)
 | 
					    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)
 | 
					        print(target)
 | 
				
			||||||
        sendmessage(target, data.get('message'))
 | 
					        sendmessage(target, data.get('message'))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user