Binato/server/packets/ChangeAction.ts

13 lines
357 B
TypeScript
Raw Normal View History

2022-11-19 01:06:03 +00:00
import { User } from "../objects/User";
import { StatusUpdate } from "./StatusUpdate";
export function ChangeAction(user:User, data:any) {
user.updatePresence(data);
if (user.spectatorStream != null) {
2023-08-20 13:03:01 +01:00
const statusUpdate = StatusUpdate(user.shared, user.id);
if (statusUpdate instanceof Buffer) {
user.spectatorStream.Send(statusUpdate);
}
2022-11-19 01:06:03 +00:00
}
}