public Mono<Pair<UpsertRelationshipResult, UpsertRelationshipResult>> friendTwoUsers(
            @NotNull Long userOneId,
            @NotNull Long userTwoId,
            @Nullable ClientSession session) {
        try {
            Validator.notNull(userOneId, "userOneId");
            Validator.notNull(userTwoId, "userTwoId");
            Validator.notEquals(userOneId,
                    userTwoId,
                    "The ID of user one must not be equal to the ID of user two");
        } catch (ResponseException e) {
            return Mono.error(e);
        }
        if (session == null) {
            return userRelationshipRepository
                    .inTransaction(newSession -> friendTwoUsers(userOneId, userTwoId, newSession))
                    .retryWhen(TRANSACTION_RETRY);
        }
        Date now = new Date();
        return upsertOneSidedRelationship(userOneId,
                userTwoId,
                null,
                null,
                DEFAULT_RELATIONSHIP_GROUP_INDEX,
                null,
                now,
                true,
                session)
                .flatMap(upsertRelationshipResult1 -> upsertOneSidedRelationship(userTwoId,
                        userOneId,
                        null,
                        null,
                        DEFAULT_RELATIONSHIP_GROUP_INDEX,
                        null,
                        now,
                        true,
                        session)
                        .map(upsertRelationshipResult2 -> Pair.of(upsertRelationshipResult1,
                                upsertRelationshipResult2)))
                .doOnSuccess(unused -> {
                    Pair<Long, Long> cacheKey = Pair.of(userOneId, userTwoId);
                    ownerIdAndRelatedUserIdToHasRelationshipAndNotBlockedCache.put(cacheKey, true);
                    ownerIdAndRelatedUserIdToIsBlockedCache.put(cacheKey, false);
                    cacheKey = Pair.of(userTwoId, userOneId);
                    ownerIdAndRelatedUserIdToHasRelationshipAndNotBlockedCache.put(cacheKey, true);
                    ownerIdAndRelatedUserIdToIsBlockedCache.put(cacheKey, false);
                });
    }
@return true if the relationship existed and has been deleted;
        <p>
        false if the relationship does not exist, or still exists and has been deleted from a
        relationship group.
turms-service/src/main/java/im/turms/service/domain/user/service/UserRelationshipService.java