Skip to content

Commit

Permalink
fix: Add 'report' attribute to the Notification entity (#900)
Browse files Browse the repository at this point in the history
This was added in Mastodon 4.0.0 and allows seeing the report data for report notifications.

See: https://docs.joinmastodon.org/entities/Notification/#report
  • Loading branch information
kytta committed May 2, 2023
1 parent ab1f1a3 commit bab715f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/mastodon/v1/entities/notification.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { Account } from './account';
import type { Report } from './report';
import type { Status } from './status';

export type NotificationType =
Expand Down Expand Up @@ -29,4 +30,7 @@ export interface Notification {

/** Status that was the object of the notification, e.g. in mentions, reblogs, favourites, or polls. */
status?: Status | null;

/** Report that was the object of the notification. Attached when type of the notification is admin.report. */
report?: Report | null;
}

0 comments on commit bab715f

Please sign in to comment.