mirror of
https://github.com/wassname/talk.git
synced 2026-07-16 11:22:16 +08:00
- implements new notification manager using connect api - first use case of plugins using the plugin api
15 lines
331 B
JavaScript
15 lines
331 B
JavaScript
const { get } = require('lodash');
|
|
|
|
module.exports = {
|
|
User: {
|
|
notificationSettings(user, args, { user: currentUser }) {
|
|
if (
|
|
currentUser &&
|
|
(currentUser.id === user.id || currentUser.can('VIEW_USER_STATUS'))
|
|
) {
|
|
return get(user, 'metadata.notifications.settings');
|
|
}
|
|
},
|
|
},
|
|
};
|