fix: don't let user invite themself to reversi game
This commit is contained in:
@@ -423,6 +423,7 @@ export async function selectUser(opts: { includeSelf?: boolean, local?: boolean
|
|||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
popup(defineAsyncComponent(() => import('@/components/MkUserSelectDialog.vue')), {
|
popup(defineAsyncComponent(() => import('@/components/MkUserSelectDialog.vue')), {
|
||||||
includeSelf: opts.includeSelf,
|
includeSelf: opts.includeSelf,
|
||||||
|
local: opts.local,
|
||||||
}, {
|
}, {
|
||||||
ok: user => {
|
ok: user => {
|
||||||
resolve(user);
|
resolve(user);
|
||||||
|
|||||||
@@ -193,7 +193,7 @@ async function matchHeatbeat() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function matchUser() {
|
async function matchUser() {
|
||||||
const user = await os.selectUser({ local: true });
|
const user = await os.selectUser({ local: true, includeSelf: false });
|
||||||
if (user == null) return;
|
if (user == null) return;
|
||||||
|
|
||||||
matchingUser.value = user;
|
matchingUser.value = user;
|
||||||
|
|||||||
Reference in New Issue
Block a user