diff --git a/webapp/pages/settings/notifications.vue b/webapp/pages/settings/notifications.vue index 5193938a7..6e7ce3a53 100644 --- a/webapp/pages/settings/notifications.vue +++ b/webapp/pages/settings/notifications.vue @@ -24,7 +24,15 @@ import { updateUserMutation } from '~/graphql/User' export default { data() { return { - emailNotificationSettings: [...this.currentUser.emailNotificationSettings], + emailNotificationSettings: { + commentOnObservedPost: true, + postByFollowedUser: true, + postInGroup: true, + groupMemberJoined: true, + groupMemberLeft: true, + groupMemberRemoved: true, + groupMemberRoleChanged: true, + }, topics: [ { id: 'commentOnObservedPost', @@ -32,13 +40,13 @@ export default { }, { id: 'postByFollowedUser', name: this.$t('settings.notifications.postByFollowedUser') }, { id: 'postInGroup', name: this.$t('settings.notifications.postInGroup') }, - { id: 'groupMemberJoined', name: this.$t('settings.notifications.groupMemberJoined') }, - { id: 'groupMemberLeft', name: this.$t('settings.notifications.groupMemberLeft') }, { id: 'groupMemberRemoved', name: this.$t('settings.notifications.groupMemberRemoved') }, { id: 'groupMemberRoleChanged', name: this.$t('settings.notifications.groupMemberRoleChanged'), }, + { id: 'groupMemberJoined', name: this.$t('settings.notifications.groupMemberJoined') }, + { id: 'groupMemberLeft', name: this.$t('settings.notifications.groupMemberLeft') }, ], } }, @@ -52,6 +60,9 @@ export default { ) }, }, + created() { + this.emailNotificationSettings = { ...this.currentUser.emailNotificationSettings } + }, methods: { ...mapMutations({ setCurrentUser: 'auth/SET_USER',