Files
talk/plugins/talk-plugin-notifications/server/resolvers.js
T
Wyatt Johnson 8b669a31c5 initial notification draft
- implements new notification manager using connect api
- first use case of plugins using the plugin api
2018-02-09 18:17:25 -07:00

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');
}
},
},
};