

def parse_message(message):
    ' Parses the payload by delegating to specialized functions. '
    events = []
    if (message['action'] in ['create', 'delete']):
        events.append(parse_create_or_delete(message))
    elif (message['action'] == 'change'):
        if message['change']['diff']:
            for value in parsed_event['change']['diff']:
                parsed_event = parse_change_event(value, message)
                if parsed_event:
                    events.append(parsed_event)
        if message['change']['comment']:
            events.append(parse_comment(message))
    return events

dataset/ETHPy150Open zulip/zulip/zerver/views/webhooks/taiga.py parse_message/VarMisuse@70/114 `message`->`parsed_event`