fix: add connectionRequests to notification schema, remove dead notifyPeerRequests
This commit is contained in:
parent
2aa29ba64b
commit
bd07172093
2 changed files with 3 additions and 5 deletions
|
|
@ -380,7 +380,6 @@ const formData = reactive({
|
||||||
// Notifications
|
// Notifications
|
||||||
notifyEvents: true,
|
notifyEvents: true,
|
||||||
notifyUpdates: true,
|
notifyUpdates: true,
|
||||||
notifyPeerRequests: true,
|
|
||||||
notifyConnectionRequests: true,
|
notifyConnectionRequests: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -437,8 +436,7 @@ const loadProfile = () => {
|
||||||
const notifs = memberData.value.notifications || {};
|
const notifs = memberData.value.notifications || {};
|
||||||
formData.notifyEvents = notifs.events ?? true;
|
formData.notifyEvents = notifs.events ?? true;
|
||||||
formData.notifyUpdates = notifs.updates ?? true;
|
formData.notifyUpdates = notifs.updates ?? true;
|
||||||
formData.notifyPeerRequests = notifs.peerRequests ?? true;
|
formData.notifyConnectionRequests = notifs.connectionRequests ?? notifs.peerRequests ?? true;
|
||||||
formData.notifyConnectionRequests = notifs.connectionRequests ?? true;
|
|
||||||
|
|
||||||
// Store initial state for change detection
|
// Store initial state for change detection
|
||||||
initialData.value = JSON.parse(JSON.stringify(formData));
|
initialData.value = JSON.parse(JSON.stringify(formData));
|
||||||
|
|
@ -461,7 +459,6 @@ const handleSubmit = async () => {
|
||||||
notifications: {
|
notifications: {
|
||||||
events: formData.notifyEvents,
|
events: formData.notifyEvents,
|
||||||
updates: formData.notifyUpdates,
|
updates: formData.notifyUpdates,
|
||||||
peerRequests: formData.notifyPeerRequests,
|
|
||||||
connectionRequests: formData.notifyConnectionRequests,
|
connectionRequests: formData.notifyConnectionRequests,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,8 @@ export const memberProfileUpdateSchema = z.object({
|
||||||
notifications: z.object({
|
notifications: z.object({
|
||||||
events: z.boolean().optional(),
|
events: z.boolean().optional(),
|
||||||
updates: z.boolean().optional(),
|
updates: z.boolean().optional(),
|
||||||
peerRequests: z.boolean().optional()
|
peerRequests: z.boolean().optional(),
|
||||||
|
connectionRequests: z.boolean().optional()
|
||||||
}).optional(),
|
}).optional(),
|
||||||
pronounsPrivacy: privacyEnum.optional(),
|
pronounsPrivacy: privacyEnum.optional(),
|
||||||
timeZonePrivacy: privacyEnum.optional(),
|
timeZonePrivacy: privacyEnum.optional(),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue