public Mono<UpdateMeetingInvitationResult> authAndUpdateMeetingInvitation(
            @NotNull Long requesterId,
            @NotNull Long meetingId,
            @Nullable String password,
            @NotNull ResponseAction responseAction) {
        try {
            Validator.notNull(requesterId, "requesterId");
            Validator.notNull(meetingId, "meetingId");
            Validator.notNull(responseAction, "responseAction");
        } catch (Exception e) {
            return Mono.error(e);
        }
        if (!hasConferenceServiceProvider()) {
            return CONFERENCE_NOT_IMPLEMENTED;
        }
        if (ResponseAction.IGNORE == responseAction
                || ResponseAction.UNRECOGNIZED == responseAction) {
            return Mono.just(new UpdateMeetingInvitationResult(false, null, null));
        }
        return meetingRepository.findById(meetingId)
                .flatMap(meeting -> {
                    Long userId = meeting.getUserId();
                    Long groupId = meeting.getGroupId();
                    // TODO: check if the user/group is active
                    Mono<UpdateMeetingInvitationResult> check = Mono.defer(() -> {
                        if (!isPasswordMatched(password, meeting.getPassword())) {
                            return EXCEPTION_ACCEPT_MEETING_INVITATION_WITH_WRONG_PASSWORD;
                        } else if (ResponseAction.DECLINE == responseAction) {
                            return Mono
                                    .just(new UpdateMeetingInvitationResult(true, null, meeting));
                        }
                        // Check for accepting.
                        Date startDate = meeting.getStartDate();
                        long now = System.currentTimeMillis();
                        if (startDate == null) {
                            long idleTimeoutMillis = userId == null
                                    ? CREATE_MEETING_OPTIONS_FOR_GROUP_MEETING.idleTimeoutMillis()
                                    : CREATE_MEETING_OPTIONS_FOR_PRIVATE_MEETING
                                            .idleTimeoutMillis();
                            long expiredDate = meeting.getCreationDate()
                                    .getTime() + idleTimeoutMillis;
                            if (expiredDate <= now) {
                                return EXCEPTION_ACCEPT_MEETING_INVITATION_OF_EXPIRED_MEETING;
                            }
                        }
                        if (isMeetingCanceled(meeting.getCancelDate(), now)) {
                            return EXCEPTION_ACCEPT_MEETING_INVITATION_OF_CANCELED_MEETING;
                        }
                        if (!isMeetingStarted(startDate, now)) {
                            return EXCEPTION_ACCEPT_MEETING_INVITATION_OF_PENDING_MEETING;
                        }
                        if (isMeetingEnded(meeting.getEndDate(), now)) {
                            return EXCEPTION_ACCEPT_MEETING_INVITATION_OF_ENDED_MEETING;
                        }
                        return pluginManager.invokeFirstExtensionPoint(
                                ConferenceServiceProvider.class,
                                ACCEPT_MEETING_INVITATION_METHOD,
                                ACCEPT_MEETING_INVITATION_NOT_IMPLEMENTED,
                                extensionPoint -> extensionPoint
                                        .acceptMeetingInvitation(requesterId, meeting.getId())
                                        .map(result -> new UpdateMeetingInvitationResult(
                                                true,
                                                result.accessToken(),
                                                meeting)));
                    });
                    if (userId != null) {
                        return userId.equals(requesterId)
                                ? check
                                : EXCEPTION_ACCEPT_NONEXISTENT_MEETING_INVITATION;
                    } else if (groupId != null) {
                        return groupMemberService.isGroupMember(groupId, requesterId, false)
                                .flatMap(isGroupMember -> isGroupMember
                                        ? check
                                        : EXCEPTION_ACCEPT_NONEXISTENT_MEETING_INVITATION);
                    } else {
                        return check;
                    }
                })
                .switchIfEmpty(EXCEPTION_ACCEPT_NONEXISTENT_MEETING_INVITATION);
    }
TODO: Allow developers to configuring whether a meeting invitation can only be updated once.
turms-service/src/main/java/im/turms/service/domain/conference/service/ConferenceService.java