This commit is contained in:
Guy Van Sanden 2025-02-12 11:39:22 +01:00
parent 84394cb3b8
commit 50a721267a

View File

@ -38,9 +38,15 @@ def sendmessage(target, message):
for chatitem in response['resp']['chatItems']: for chatitem in response['resp']['chatItems']:
statusdict = chatitem['chatItem']['meta']['itemStatus'] statusdict = chatitem['chatItem']['meta']['itemStatus']
status = statusdict['sndProgress'] try:
smessage = chatitem['chatItem']['meta']['itemText'] status = statusdict['sndProgress']
print("Message '%s' sent over websocket to %s, status was %s" % (smessage, target, status)) except KeyError:
print("FAILED")
pprint(statusdict)
status = 'FAILED'
else:
smessage = chatitem['chatItem']['meta']['itemText']
print("Message '%s' sent over websocket to %s, status was %s" % (smessage, target, status))
if status == 'complete': if status == 'complete':
return True return True