enhance(reversi): more robust matching process
This commit is contained in:
parent
cc420c245f
commit
65557d5f27
9 changed files with 74 additions and 25 deletions
|
@ -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 => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue