mirror of
https://github.com/wassname/talk.git
synced 2026-07-07 13:06:29 +08:00
8b669a31c5
- 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');
|
|
}
|
|
},
|
|
},
|
|
};
|