Merge remote-tracking branch 'misskey-original/develop' into develop

# Conflicts:
#	package.json
This commit is contained in:
mattyatea 2024-01-25 20:16:33 +09:00
commit 89b4cc3822
3 changed files with 13 additions and 7 deletions

View file

@ -2482,6 +2482,11 @@ _reversi:
freeMatch: "自由對戰" freeMatch: "自由對戰"
lookingForPlayer: "正在搜尋對手" lookingForPlayer: "正在搜尋對手"
gameCanceled: "對弈已被取消" gameCanceled: "對弈已被取消"
shareToTlTheGameWhenStart: "在遊戲開始時將對弈資訊發布到時間軸"
iStartedAGame: "對弈開始了! #MisskeyReversi"
opponentHasSettingsChanged: "對手更改了設定"
allowIrregularRules: "允許異常規則(完全自由)"
disallowIrregularRules: "不允許異常規則"
_offlineScreen: _offlineScreen:
title: "離線-無法連接伺服器" title: "離線-無法連接伺服器"
header: "無法連接伺服器" header: "無法連接伺服器"

View file

@ -1,6 +1,6 @@
{ {
"name": "misskey", "name": "misskey",
"version": "2024.2.0-beta.6-PrisMisskey.1", "version": "2024.2.0-beta.7-PrisMisskey.1",
"codename": "nasubi", "codename": "nasubi",
"repository": { "repository": {
"type": "git", "type": "git",

View file

@ -120,7 +120,9 @@ export class ReversiService implements OnApplicationShutdown, OnModuleInit {
if (invitations.includes(targetUser.id)) { if (invitations.includes(targetUser.id)) {
await this.redisClient.zrem(`reversi:matchSpecific:${me.id}`, targetUser.id); await this.redisClient.zrem(`reversi:matchSpecific:${me.id}`, targetUser.id);
const game = await this.matched(targetUser.id, me.id); const game = await this.matched(targetUser.id, me.id, {
noIrregularRules: false,
});
return game; return game;
} }
@ -166,7 +168,9 @@ export class ReversiService implements OnApplicationShutdown, OnModuleInit {
const invitorId = invitations[Math.floor(Math.random() * invitations.length)]; const invitorId = invitations[Math.floor(Math.random() * invitations.length)];
await this.redisClient.zrem(`reversi:matchSpecific:${me.id}`, invitorId); await this.redisClient.zrem(`reversi:matchSpecific:${me.id}`, invitorId);
const game = await this.matched(invitorId, me.id); const game = await this.matched(invitorId, me.id, {
noIrregularRules: false,
});
return game; return game;
} }
@ -214,10 +218,7 @@ export class ReversiService implements OnApplicationShutdown, OnModuleInit {
@bindThis @bindThis
public async matchAnyUserCancel(user: MiUser) { public async matchAnyUserCancel(user: MiUser) {
const redisPipeline = this.redisClient.pipeline(); await this.redisClient.zrem('reversi:matchAny', user.id, user.id + ':noIrregularRules');
redisPipeline.zrem('reversi:matchAny', user.id);
redisPipeline.zrem('reversi:matchAny', user.id + ':noIrregularRules');
await redisPipeline.exec();
} }
@bindThis @bindThis