Skip to content

Commit

Permalink
feat: add VoteableData.*ReportsDismissed
Browse files Browse the repository at this point in the history
  • Loading branch information
thislooksfun committed Mar 13, 2021
1 parent 88aa05a commit 41da3f1
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/objects/voteable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,13 @@ export interface VoteableData extends ContentData {
*/
modReports: [string, string][];

/**
* The old reports on this item that were made by mods.
*
* Each entry is of the form `[report, username]`.
*/
modReportsDismissed?: [string, string][];

// TODO: Document Voteable.noFollow
noFollow: boolean;

Expand Down Expand Up @@ -206,6 +213,13 @@ export interface VoteableData extends ContentData {
* Each entry is of the form `[report, count]`.
*/
userReports: [string, number][];

/**
* The old reports on this item that were made by users.
*
* Each entry is of the form `[report, count]`.
*/
userReportsDismissed?: [string, number][];
}

/** The base for all content that you can vote on. */
Expand Down Expand Up @@ -239,6 +253,7 @@ export default abstract class Voteable extends Content implements VoteableData {
modReasonBy: string | null;
modReasonTitle: string | null;
modReports: [string, string][];
modReportsDismissed?: [string, string][];
noFollow: boolean;
numReports: number;
permalink: string;
Expand All @@ -250,6 +265,7 @@ export default abstract class Voteable extends Content implements VoteableData {
subreddit: string;
subredditType: SubredditType;
userReports: [string, number][];
userReportsDismissed?: [string, number][];

protected controls: VoteableControls;

Expand Down Expand Up @@ -287,6 +303,7 @@ export default abstract class Voteable extends Content implements VoteableData {
this.modReasonBy = data.modReasonBy;
this.modReasonTitle = data.modReasonTitle;
this.modReports = data.modReports;
this.modReportsDismissed = data.modReportsDismissed;
this.noFollow = data.noFollow;
this.numReports = data.numReports;
this.permalink = data.permalink;
Expand All @@ -298,6 +315,7 @@ export default abstract class Voteable extends Content implements VoteableData {
this.subreddit = data.subreddit;
this.subredditType = data.subredditType;
this.userReports = data.userReports;
this.userReportsDismissed = data.userReportsDismissed;
}

/**
Expand Down

0 comments on commit 41da3f1

Please sign in to comment.