mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2026-01-20 20:01:25 +00:00
removed obsolete settings, introduced mention setting
This commit is contained in:
parent
58ceceab68
commit
b67de647c2
@ -12,8 +12,7 @@ export async function up(next) {
|
||||
await transaction.run(`
|
||||
MATCH (user:User)
|
||||
SET user.emailNotificationsCommentOnObservedPost = user.sendNotificationEmails
|
||||
SET user.emailNotificationsPostByFollowedUser = user.sendNotificationEmails
|
||||
SET user.emailNotificationsPostInGroup = user.sendNotificationEmails
|
||||
SET user.emailNotificationsMention = user.sendNotificationEmails
|
||||
SET user.emailNotificationsGroupMemberJoined = user.sendNotificationEmails
|
||||
SET user.emailNotificationsGroupMemberLeft = user.sendNotificationEmails
|
||||
SET user.emailNotificationsGroupMemberRemoved = user.sendNotificationEmails
|
||||
@ -45,8 +44,7 @@ export async function down(next) {
|
||||
MATCH (user:User)
|
||||
SET user.sendNotificationEmails = true
|
||||
REMOVE user.emailNotificationsCommentOnObservedPost
|
||||
REMOVE user.emailNotificationsPostByFollowedUser
|
||||
REMOVE user.emailNotificationsPostInGroup
|
||||
REMOVE user.emailNotificationsMention
|
||||
REMOVE user.emailNotificationsGroupMemberJoined
|
||||
REMOVE user.emailNotificationsGroupMemberLeft
|
||||
REMOVE user.emailNotificationsGroupMemberRemoved
|
||||
|
||||
@ -101,7 +101,7 @@ const handleContentDataOfPost = async (resolve, root, args, context, resolveInfo
|
||||
if (post) {
|
||||
await publishNotifications(context, [
|
||||
notifyUsersOfMention('Post', post.id, idsOfUsers, 'mentioned_in_post', context),
|
||||
], 'TODO')
|
||||
], 'emailNotificationsMention')
|
||||
}
|
||||
return post
|
||||
}
|
||||
@ -120,7 +120,7 @@ const handleContentDataOfComment = async (resolve, root, args, context, resolveI
|
||||
'mentioned_in_comment',
|
||||
context,
|
||||
),
|
||||
], 'TODO')
|
||||
], 'emailNotificationsMention')
|
||||
|
||||
await publishNotifications(context, [
|
||||
notifyUsersOfComment('Comment', comment.id, 'commented_on_post', context),
|
||||
@ -129,11 +129,6 @@ const handleContentDataOfComment = async (resolve, root, args, context, resolveI
|
||||
return comment
|
||||
}
|
||||
|
||||
/* TODO unused
|
||||
emailNotificationsPostByFollowedUser: true
|
||||
emailNotificationsPostInGroup: true
|
||||
*/
|
||||
|
||||
const postAuthorOfComment = async (commentId, { context }) => {
|
||||
const session = context.driver.session()
|
||||
let postAuthorId
|
||||
|
||||
@ -161,11 +161,7 @@ export default {
|
||||
type: 'boolean',
|
||||
default: true,
|
||||
},
|
||||
emailNotificationsPostByFollowedUser: {
|
||||
type: 'boolean',
|
||||
default: true,
|
||||
},
|
||||
emailNotificationsPostInGroup: {
|
||||
emailNotificationsMention: {
|
||||
type: 'boolean',
|
||||
default: true,
|
||||
},
|
||||
|
||||
@ -159,6 +159,7 @@ export default {
|
||||
emailNotificationSettings.forEach((setting) => {
|
||||
const allowedSettingNames = [
|
||||
'commentOnObservedPost',
|
||||
'mention',
|
||||
'postByFollowedUser',
|
||||
'postInGroup',
|
||||
'groupMemberJoined',
|
||||
@ -395,11 +396,10 @@ export default {
|
||||
value: parent.emailNotificationsCommentOnObservedPost ?? true,
|
||||
},
|
||||
{
|
||||
name: 'postByFollowedUser',
|
||||
name: 'mention',
|
||||
type: 'post',
|
||||
value: parent.emailNotificationsPostByFollowedUser ?? true,
|
||||
value: parent.emailNotificationsMention ?? true,
|
||||
},
|
||||
{ name: 'postInGroup', type: 'post', value: parent.emailNotificationsPostInGroup ?? true},
|
||||
{
|
||||
name: 'groupMemberJoined',
|
||||
type: 'group',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user