How do I check if a moderator has joined?

I need to trigger some code as soon as a moderator has joined.

I found commonUserJoinedHandling, but for some reason, the role returned by user.getRole() is always participant, except when refreshing another participants browser window. Does the role get set later on?