def handle_user_event(message, socket):
    if socket.request.authenticated_userid != message['userid']:
        return None

    # for session state change events, the full session model
    # is included so that clients can update themselves without
    # further API requests
    return {
        'type': 'session-change',
        'action': message['type'],
        'model': message['session_model']
    }
Get message about user event `message` to be sent to `socket`.
dataset/ETHPy150Open hypothesis/h/h/streamer/messages.py/handle_user_event