getRole() always return none, no moderator is set

When I join a room with no users, moderator role is not set and getRole() always returns none

I am using following connection options

const options = {
    hosts: {
        domain: 'meet.jit.si',
        muc: 'conference.meet.jit.si',
        focus: 'focus.meet.jit.si',
    },
    externalConnectUrl: 'https://meet.jit.si/http-pre-bind',
    enableP2P: true,
    p2p: {
        enabled: true,
        preferH264: true,
        disableH264: true,
        useStunTurn: true,
    },
    useStunTurn: true,
    bosh: `https://meet.jit.si/http-bind?room=liveroom`,
    websocket: 'wss://meet.jit.si/xmpp-websocket',
    clientNode: 'http://jitsi.org/jitsimeet',
}

Changing the role happens after joining. Checkout the API for
api.addEventListener('participantRoleChanged', function(event) {