mirror of
https://github.com/sct/overseerr.git
synced 2025-09-17 17:24:35 +02:00
feat(notifications): add option to send notifications for auto-approved requests
closes #267
This commit is contained in:
@@ -201,6 +201,18 @@ export class MediaRequest {
|
||||
}
|
||||
}
|
||||
|
||||
@AfterInsert()
|
||||
public async autoapprovalNotification(): Promise<void> {
|
||||
const settings = getSettings().notifications;
|
||||
|
||||
if (
|
||||
settings.autoapprovalEnabled &&
|
||||
this.status === MediaRequestStatus.APPROVED
|
||||
) {
|
||||
this.notifyApprovedOrDeclined();
|
||||
}
|
||||
}
|
||||
|
||||
@AfterUpdate()
|
||||
@AfterInsert()
|
||||
public async updateParentStatus(): Promise<void> {
|
||||
|
Reference in New Issue
Block a user