upd: add notification for failures, add reasons for failure, apply suggestions
This commit is contained in:
parent
f08d1ec38f
commit
fc9d777dc3
17 changed files with 110 additions and 28 deletions
|
|
@ -18,8 +18,6 @@ type MinimumUser = {
|
|||
};
|
||||
|
||||
export type MiScheduleNoteType={
|
||||
/** Date.toISOString() */
|
||||
createdAt: string;
|
||||
visibility: 'public' | 'home' | 'followers' | 'specified';
|
||||
visibleUsers: MinimumUser[];
|
||||
channel?: MiChannel['id'];
|
||||
|
|
|
|||
|
|
@ -122,6 +122,11 @@ export type MiNotification = {
|
|||
createdAt: string;
|
||||
notifierId: MiUser['id'];
|
||||
noteId: MiNote['id'];
|
||||
} | {
|
||||
type: 'scheduledNoteFailed';
|
||||
id: string;
|
||||
createdAt: string;
|
||||
reason: string;
|
||||
};
|
||||
|
||||
export type MiGroupedNotification = MiNotification | {
|
||||
|
|
|
|||
|
|
@ -369,6 +369,20 @@ export const packedNotificationSchema = {
|
|||
optional: false, nullable: false,
|
||||
},
|
||||
},
|
||||
}, {
|
||||
type: 'object',
|
||||
properties: {
|
||||
...baseSchema.properties,
|
||||
type: {
|
||||
type: 'string',
|
||||
optional: false, nullable: false,
|
||||
enum: ['scheduledNoteFailed'],
|
||||
},
|
||||
reason: {
|
||||
type: 'string',
|
||||
optional: false, nullable: false,
|
||||
},
|
||||
},
|
||||
}, {
|
||||
type: 'object',
|
||||
properties: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue