mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-03 04:25:55 +01:00
refactor(socket.io): deprecate SocketModules.chats.isDnD in favour of api.users.getStatus
This commit is contained in:
@@ -142,6 +142,11 @@ usersAPI.updateSettings = async function (caller, data) {
|
||||
return await user.saveSettings(data.uid, payload);
|
||||
};
|
||||
|
||||
usersAPI.getStatus = async (caller, { uid }) => {
|
||||
const status = await db.getObjectField(`user:${uid}`, 'status');
|
||||
return { status };
|
||||
};
|
||||
|
||||
usersAPI.changePassword = async function (caller, data) {
|
||||
await user.changePassword(caller.uid, Object.assign(data, { ip: caller.ip }));
|
||||
await events.log({
|
||||
|
||||
Reference in New Issue
Block a user