Binato/server/packets/ChangeAction.ts

11 lines
312 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) {
const statusUpdate = StatusUpdate(user, user.id, false);
user.spectatorStream.Send(statusUpdate);
}
}