mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-19 23:03:51 +02:00
Misc fixes
This commit is contained in:
@@ -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