mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-06 22:46:06 +02:00
update user ref to be offline when user goes offline
This commit is contained in:
+10
-6
@@ -5355,16 +5355,20 @@ speechSynthesis.getVoices();
|
|||||||
(ctx.state === 'online')) {
|
(ctx.state === 'online')) {
|
||||||
ctx.ref.$online_for = '';
|
ctx.ref.$online_for = '';
|
||||||
ctx.ref.$offline_for = Date.now();
|
ctx.ref.$offline_for = Date.now();
|
||||||
if (ctx.state === 'online') {
|
if (ctx.state === 'online') {
|
||||||
var ts = Date.now();
|
var ts = Date.now();
|
||||||
var time = ts - ctx.ref.$location_at;
|
var time = ts - ctx.ref.$location_at;
|
||||||
this.addFeed('Offline', ctx.ref, {
|
API.getUser({
|
||||||
location: (ctx.ref.location === 'offline') ? '' : ctx.ref.location,
|
userId: id
|
||||||
time: time
|
});
|
||||||
|
this.addFeed('Offline', ctx.ref, {
|
||||||
|
location: (ctx.ref.location === 'offline') ? '' : ctx.ref.location,
|
||||||
|
time: time
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ((state === 'online')) {
|
if ((state === 'online')) {
|
||||||
|
if (state === 'online') {
|
||||||
ctx.ref.$location_at = Date.now();
|
ctx.ref.$location_at = Date.now();
|
||||||
ctx.ref.$online_for = Date.now();
|
ctx.ref.$online_for = Date.now();
|
||||||
ctx.ref.$offline_for = '';
|
ctx.ref.$offline_for = '';
|
||||||
|
|||||||
Reference in New Issue
Block a user