2020-11-03 02:08:57 +00:00
|
|
|
const StatusUpdate = require("./StatusUpdate.js");
|
|
|
|
|
2020-08-27 13:09:35 +01:00
|
|
|
module.exports = function(currentUser, data) {
|
|
|
|
currentUser.updatePresence(data);
|
2020-11-03 02:08:57 +00:00
|
|
|
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
|
|
|
}
|