public Mono<UpdateResult> updatePendingInvitationStatus(
            @NotNull Long groupId,
            @NotNull Long invitationId,
            @NotNull @ValidRequestStatus RequestStatus requestStatus,
            @Nullable String reason,
            @Nullable ClientSession session) {
        try {
            Validator.notNull(groupId, "groupId");
            Validator.notNull(invitationId, "invitationId");
            Validator.notNull(requestStatus, "requestStatus");
            DataValidator.validRequestStatus(requestStatus);
            Validator.notEquals(requestStatus,
                    RequestStatus.PENDING,
                    "The request status must not be PENDING");
        } catch (ResponseException e) {
            return Mono.error(e);
        }
        return groupInvitationRepository
                .updateStatusIfPending(invitationId, requestStatus, reason, session)
                .flatMap(result -> result.getModifiedCount() > 0
                        ? groupVersionService.updateGroupInvitationsVersion(groupId)
                                .onErrorResume(t -> {
                                    LOGGER.error(
                                            "Caught an error while updating the invitation version of the group ({}) after updating a pending invitation",
                                            groupId,
                                            t);
                                    return Mono.empty();
                                })
                                .thenReturn(result)
                        : Mono.just(result));
    }
@return group ID, invitee ID, and status
turms-service/src/main/java/im/turms/service/domain/group/service/GroupInvitationService.java