enhance(reversi): more robust matching process

This commit is contained in:
syuilo
2024-01-24 10:16:05 +09:00
parent cc420c245f
commit 65557d5f27
9 changed files with 74 additions and 25 deletions

View File

@@ -37,6 +37,7 @@ export const paramDef = {
type: 'object',
properties: {
userId: { type: 'string', format: 'misskey:id', nullable: true },
multiple: { type: 'boolean', default: false },
},
required: [],
} as const;
@@ -56,7 +57,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
throw err;
}) : null;
const game = target ? await this.reversiService.matchSpecificUser(me, target) : await this.reversiService.matchAnyUser(me);
const game = target ? await this.reversiService.matchSpecificUser(me, target, ps.multiple) : await this.reversiService.matchAnyUser(me, ps.multiple);
if (game == null) return;