Add noteAutoDelete to user_profile
This commit is contained in:
parent
bd11dabf89
commit
83c971b1a8
6 changed files with 49 additions and 0 deletions
|
@ -88,6 +88,14 @@ export const meta = {
|
|||
type: 'string',
|
||||
},
|
||||
},
|
||||
autoDeleteNotes: {
|
||||
type: 'boolean',
|
||||
optional: false, nullable: false,
|
||||
},
|
||||
autoDeleteNotesMinutes: {
|
||||
type: 'number',
|
||||
optional: false, nullable: false,
|
||||
},
|
||||
notificationRecieveConfig: {
|
||||
type: 'object',
|
||||
optional: false, nullable: false,
|
||||
|
@ -239,6 +247,8 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
receiveAnnouncementEmail: profile.receiveAnnouncementEmail,
|
||||
mutedWords: profile.mutedWords,
|
||||
mutedInstances: profile.mutedInstances,
|
||||
autoDeleteNotesMinutes: profile.autoDeleteNotesMinutes,
|
||||
autoDeleteNotes: profile.autoDeleteNotes,
|
||||
notificationRecieveConfig: profile.notificationRecieveConfig,
|
||||
isModerator: isModerator,
|
||||
isSilenced: isSilenced,
|
||||
|
|
|
@ -202,6 +202,8 @@ export const paramDef = {
|
|||
mutedInstances: { type: 'array', items: {
|
||||
type: 'string',
|
||||
} },
|
||||
autoDeleteNotes: { type: 'boolean', nullable: false },
|
||||
autoDeleteNotesMinutes: { type: 'number', nullable: false, minimum: 1 },
|
||||
notificationRecieveConfig: {
|
||||
type: 'object',
|
||||
nullable: false,
|
||||
|
@ -319,6 +321,8 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
profileUpdates.hardMutedWords = ps.hardMutedWords;
|
||||
}
|
||||
if (ps.mutedInstances !== undefined) profileUpdates.mutedInstances = ps.mutedInstances;
|
||||
if (ps.autoDeleteNotes !== undefined) profileUpdates.autoDeleteNotes = ps.autoDeleteNotes;
|
||||
if (ps.autoDeleteNotesMinutes !== undefined) profileUpdates.autoDeleteNotesMinutes = ps.autoDeleteNotesMinutes;
|
||||
if (ps.notificationRecieveConfig !== undefined) profileUpdates.notificationRecieveConfig = ps.notificationRecieveConfig;
|
||||
if (typeof ps.isLocked === 'boolean') updates.isLocked = ps.isLocked;
|
||||
if (typeof ps.isExplorable === 'boolean') updates.isExplorable = ps.isExplorable;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue