mirror of
https://github.com/YuzuZensai/VRC-Circle.git
synced 2026-09-13 10:58:59 +00:00
🐛 fix: don't mark self online on offline location events
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user