docs: private void checkRoleModifications(
          MUCRole oldRole,
          MUCRole newRole,
          boolean isUserModification,
          EntityFullJid from) {
          // Voice was granted to a visitor
          if ((MUCRole.visitor.equals(oldRole) || MUCRole.none.equals(oldRole))
              && MUCRole.participant.equals(newRole)) {
              if (isUserModification) {
                  for (UserStatusListener listener : userStatusListeners) {
                      listener.voiceGranted();
                  }
              }
              else {
                  for (ParticipantStatusListener listener : participantStatusListeners) {
                      listener.voiceGranted(from);
                  }
              }
          }
          // The participant's voice was revoked from the room
          else if (
              MUCRole.participant.equals(oldRole)
                  && (MUCRole.visitor.equals(newRole) || MUCRole.none.equals(newRole))) {
              if (isUserModification) {
                  for (UserStatusListener listener : userStatusListeners) {
                      listener.voiceRevoked();
                  }
              }
              else {
                  for (ParticipantStatusListener listener : participantStatusListeners) {
                      listener.voiceRevoked(from);
                  }
              }
          }
          // Moderator privileges were granted to a participant
          if (!MUCRole.moderator.equals(oldRole) && MUCRole.moderator.equals(newRole)) {
              if (MUCRole.visitor.equals(oldRole) || MUCRole.none.equals(oldRole)) {
                  if (isUserModification) {
                      for (UserStatusListener listener : userStatusListeners) {
                          listener.voiceGranted();
                      }
                  }
                  else {
                      for (ParticipantStatusListener listener : participantStatusListeners) {
                          listener.voiceGranted(from);
                      }
                  }
              }
              if (isUserModification) {
                  for (UserStatusListener listener : userStatusListeners) {
                      listener.moderatorGranted();
                  }
              }
              else {
                  for (ParticipantStatusListener listener : participantStatusListeners) {
                      listener.moderatorGranted(from);
                  }
              }
          }
          // Moderator privileges were revoked from a participant
          else if (MUCRole.moderator.equals(oldRole) && !MUCRole.moderator.equals(newRole)) {
              if (MUCRole.visitor.equals(newRole) || MUCRole.none.equals(newRole)) {
                  if (isUserModification) {
                      for (UserStatusListener listener : userStatusListeners) {
                          listener.voiceRevoked();
                      }
                  }
                  else {
                      for (ParticipantStatusListener listener : participantStatusListeners) {
                          listener.voiceRevoked(from);
                      }
                  }
              }
              if (isUserModification) {
                  for (UserStatusListener listener : userStatusListeners) {
                      listener.moderatorRevoked();
                  }
              }
              else {
                  for (ParticipantStatusListener listener : participantStatusListeners) {
                      listener.moderatorRevoked(from);
                  }
              }
          }
      }