Binato/server/Packets/ChangeAction.js
2022-08-26 12:52:00 +01:00

11 lines
No EOL
378 B
JavaScript

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);
}
}