upd: add notification for when scheduled note gets posted

This commit is contained in:
Marie 2024-11-04 11:22:37 +01:00
parent 170093f2a2
commit 1d3c825398
No known key found for this signature in database
GPG key ID: 7ADF6C9CD9A28555
13 changed files with 77 additions and 9 deletions

View file

@ -127,6 +127,11 @@ export type MiNotification = {
id: string;
createdAt: string;
reason: string;
} | {
type: 'scheduledNotePosted';
id: string;
createdAt: string;
noteId: MiNote['id'];
};
export type MiGroupedNotification = MiNotification | {

View file

@ -383,6 +383,31 @@ export const packedNotificationSchema = {
optional: false, nullable: false,
},
},
}, {
type: 'object',
properties: {
...baseSchema.properties,
type: {
type: 'string',
optional: false, nullable: false,
enum: ['scheduledNotePosted'],
},
user: {
type: 'object',
ref: 'UserLite',
optional: false, nullable: false,
},
userId: {
type: 'string',
optional: false, nullable: false,
format: 'id',
},
note: {
type: 'object',
ref: 'Note',
optional: false, nullable: false,
},
},
}, {
type: 'object',
properties: {