Binato/server/Packets/ChangeAction.js

10 lines
376 B
JavaScript
Raw Normal View History

const StatusUpdate = require("./StatusUpdate.js");
2020-08-27 13:09:35 +01:00
module.exports = function(currentUser, data) {
currentUser.updatePresence(data);
if (global.StreamsHandler.doesStreamExist(`sp_${currentUser.username}`)) {
const statusUpdate = StatusUpdate(currentUser, currentUser.id, false);
global.StreamsHandler.sendToStream(`sp_${currentUser.username}`, statusUpdate, null);
}
2020-08-27 13:09:35 +01:00
}