diff --git a/web.py b/web.py index 0c1aed2..3534d86 100644 --- a/web.py +++ b/web.py @@ -136,6 +136,23 @@ def lxmf_delivery(message): "image_bytes": image_bytes, }) + # handle commands field + if field_type == LXMF.FIELD_COMMANDS: + + # process commands + commands = [] + for command in value: + command_string = command[0] + commands.append({ + "command_string": command_string, + }) + + # add to fields + fields.append({ + "type": "commands", + "commands": commands, + }) + # send received lxmf message data to all websocket clients websocket_broadcast(json.dumps({ "type": "lxmf.delivery",