Debug
This commit is contained in:
parent
a3010018d4
commit
a529e1eb53
@ -34,13 +34,15 @@ def sendmessage(target, message):
|
|||||||
ws.send(json_command) # Send message to WebSocket
|
ws.send(json_command) # Send message to WebSocket
|
||||||
responsejson = ws.recv() # Receive response
|
responsejson = ws.recv() # Receive response
|
||||||
response = json.loads(responsejson)
|
response = json.loads(responsejson)
|
||||||
for chatitem in response['resp']['chatItems']:
|
|
||||||
pprint(chatitem['chatItem'])
|
|
||||||
print("Message %s sent over websocket to %s" % (chatitem['chatItem']['content']['msgContent']['text'], target))
|
|
||||||
# ws.close() # Close WebSocket connection
|
|
||||||
# print(response)
|
|
||||||
ws.close()
|
ws.close()
|
||||||
return response
|
|
||||||
|
for chatitem in response['resp']['chatItems']:
|
||||||
|
status = chatitem['chatItem']['meta']['itemStatus']
|
||||||
|
smessage = chatitem['chatItem']['meta']['itemText']
|
||||||
|
print("Message %s sent over websocket to %s, status was %s" % (smessage, target, status))
|
||||||
|
|
||||||
|
if chatitem['chatItem']['content']
|
||||||
|
|
||||||
|
|
||||||
@app.route("/webhook/<id>", methods=['POST'])
|
@app.route("/webhook/<id>", methods=['POST'])
|
||||||
def webhook_receiver(id):
|
def webhook_receiver(id):
|
||||||
|
Loading…
Reference in New Issue
Block a user