mirror of
https://github.com/wassname/talk.git
synced 2026-06-30 06:47:33 +08:00
14 lines
270 B
JavaScript
14 lines
270 B
JavaScript
const {
|
|
VIEW_USER_STATUS
|
|
} = require('../../perms/constants');
|
|
|
|
const UserState = {
|
|
status: (user, args, ctx) => {
|
|
if (ctx.user && (ctx.user.id === user.id || ctx.user.can(VIEW_USER_STATUS))) {
|
|
return user.status;
|
|
}
|
|
}
|
|
};
|
|
|
|
module.exports = UserState;
|