mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-17 13:53:52 +02:00
Misc fixes
This commit is contained in:
@@ -12,6 +12,9 @@ import { parseLocation } from './location';
|
||||
* @returns
|
||||
*/
|
||||
function checkCanInvite(location) {
|
||||
if (!location) {
|
||||
return false;
|
||||
}
|
||||
const userStore = useUserStore();
|
||||
const locationStore = useLocationStore();
|
||||
const instanceStore = useInstanceStore();
|
||||
@@ -42,6 +45,9 @@ function checkCanInvite(location) {
|
||||
* @returns
|
||||
*/
|
||||
function checkCanInviteSelf(location) {
|
||||
if (!location) {
|
||||
return false;
|
||||
}
|
||||
const userStore = useUserStore();
|
||||
const instanceStore = useInstanceStore();
|
||||
const friendStore = useFriendStore();
|
||||
|
||||
@@ -8,17 +8,17 @@ import { convertFileUrlToImageUrl } from './common';
|
||||
/**
|
||||
*
|
||||
* @param {object} ctx
|
||||
* @returns {number}
|
||||
* @returns {string?}
|
||||
*/
|
||||
function userOnlineForTimestamp(ctx) {
|
||||
if (ctx.ref.state === 'online' && ctx.ref.$online_for) {
|
||||
return ctx.ref.$online_for;
|
||||
return new Date(ctx.ref.$online_for).toJSON();
|
||||
} else if (ctx.ref.state === 'active' && ctx.ref.$active_for) {
|
||||
return ctx.ref.$active_for;
|
||||
return new Date(ctx.ref.$active_for).toJSON();
|
||||
} else if (ctx.ref.$offline_for) {
|
||||
return ctx.ref.$offline_for;
|
||||
return new Date(ctx.ref.$offline_for).toJSON();
|
||||
}
|
||||
return 0;
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user