Skip to content

Commit

Permalink
fix(notifications): read archived notifications from the correct sour…
Browse files Browse the repository at this point in the history
…ce directory (#18)
  • Loading branch information
TheNoim authored Jan 17, 2022
1 parent 646204a commit 2f22841
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/modules/unraid/extensions/notifications.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,10 @@ export class UnraidModuleNotificationExtension<
return Promise.all(
sources.map((source) =>
(async () => {
const { code, stdout } = await this.instance.execute(`cat /tmp/notifications/unread/${source}`);
const notificationType = isArchived ? 'archive' : 'unread';
const { code, stdout } = await this.instance.execute(
`cat /tmp/notifications/${notificationType}/${source}`
);
if (code === 0) {
parsedNotifications.push(parseNotification(stdout, source, isArchived));
}
Expand Down

0 comments on commit 2f22841

Please sign in to comment.