From d6d9c54ed60ac14847e66b8a088433fce6439c6c Mon Sep 17 00:00:00 2001 From: Yuzu Date: Tue, 30 Jun 2026 23:26:02 +0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix:=20don't=20mark=20self=20onl?= =?UTF-8?q?ine=20on=20offline=20location=20events?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/store/social.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/main/store/social.ts b/src/main/store/social.ts index 330e376..8655b60 100644 --- a/src/main/store/social.ts +++ b/src/main/store/social.ts @@ -139,8 +139,15 @@ function subscribe(vrc: VRChat & Pipeline): void { const d = asRecord(data); const id = (d.userId ?? userOf(data).id) as string | undefined; if (!id) return; + const loc = d.location as string | undefined; const fromUser = patchFromUser(userOf(data)) ?? { id }; - entityStore.upsert({ ...fromUser, id, location: d.location as string, state: "online" }); + const offline = !loc || loc.startsWith("offline"); + entityStore.upsert({ + ...fromUser, + id, + location: offline ? "offline" : loc, + state: offline ? "offline" : "online", + }); }; vrc.on("friend-location", location); vrc.on("user-location", location);