Skip to content
Snippets Groups Projects
Commit 547be197 authored by syuilo's avatar syuilo
Browse files

fix of 65557d5f

parent 65557d5f
No related branches found
No related tags found
10 merge requests!449release 2024.3.1,!448Release 2023.3.1 - Codename #NotDeadYet,!34Merge Beta3,!35fix: admin css,!36Fix Like button not working on renotes/boosts,!37merge develope,!57Merge Latest Changes,!62fix: background overlaying,!682023.9.1.beta5,!112update develop with stable changes
......@@ -7,7 +7,7 @@ import { Inject, Injectable } from '@nestjs/common';
import * as Redis from 'ioredis';
import { ModuleRef } from '@nestjs/core';
import * as Reversi from 'misskey-reversi';
import { IsNull, LessThan } from 'typeorm';
import { IsNull, LessThan, MoreThan } from 'typeorm';
import type {
MiReversiGame,
ReversiGamesRepository,
......@@ -98,8 +98,8 @@ export class ReversiService implements OnApplicationShutdown, OnModuleInit {
// 既にマッチしている対局が無いか探す(3分以内)
const games = await this.reversiGamesRepository.find({
where: [
{ id: LessThan(this.idService.gen(Date.now() - 1000 * 60 * 3)), user1Id: me.id, user2Id: targetUser.id, isStarted: false },
{ id: LessThan(this.idService.gen(Date.now() - 1000 * 60 * 3)), user1Id: targetUser.id, user2Id: me.id, isStarted: false },
{ id: MoreThan(this.idService.gen(Date.now() - 1000 * 60 * 3)), user1Id: me.id, user2Id: targetUser.id, isStarted: false },
{ id: MoreThan(this.idService.gen(Date.now() - 1000 * 60 * 3)), user1Id: targetUser.id, user2Id: me.id, isStarted: false },
],
relations: ['user1', 'user2'],
order: { id: 'DESC' },
......@@ -140,8 +140,8 @@ export class ReversiService implements OnApplicationShutdown, OnModuleInit {
// 既にマッチしている対局が無いか探す(3分以内)
const games = await this.reversiGamesRepository.find({
where: [
{ id: LessThan(this.idService.gen(Date.now() - 1000 * 60 * 3)), user1Id: me.id, isStarted: false },
{ id: LessThan(this.idService.gen(Date.now() - 1000 * 60 * 3)), user2Id: me.id, isStarted: false },
{ id: MoreThan(this.idService.gen(Date.now() - 1000 * 60 * 3)), user1Id: me.id, isStarted: false },
{ id: MoreThan(this.idService.gen(Date.now() - 1000 * 60 * 3)), user2Id: me.id, isStarted: false },
],
relations: ['user1', 'user2'],
order: { id: 'DESC' },
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment