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

@ -139,7 +139,9 @@ if ($i) {
const connection = useStream().useChannel('reversi');
connection.on('matched', x => {
startGame(x.game);
if (matchingUser.value != null || matchingAny.value) {
startGame(x.game);
}
});
connection.on('invited', invitation => {
@ -222,7 +224,7 @@ async function accept(user) {
}
}
useInterval(matchHeatbeat, 1000 * 10, { immediate: false, afterMounted: true });
useInterval(matchHeatbeat, 1000 * 5, { immediate: false, afterMounted: true });
onMounted(() => {
misskeyApi('reversi/invitations').then(_invitations => {