Binato/server/Packets/ChangeAction.js
2022-09-30 11:34:13 +01:00

11 lines
No EOL
378 B
JavaScript
Executable file

const StatusUpdate = require("./StatusUpdate.js"),
Streams = require("../Streams.js");
module.exports = function(currentUser, data) {
currentUser.updatePresence(data);
if (Streams.exists(`sp_${currentUser.username}`)) {
const statusUpdate = StatusUpdate(currentUser, currentUser.id, false);
Streams.sendToStream(`sp_${currentUser.username}`, statusUpdate, null);
}
}