moderator-toolbox-nxg-for-reddit / modules/shared/redditElements/deriveStatus

modules/shared/redditElements/deriveStatus

Functions

deriveThingStatus()

deriveThingStatus(thing): object

Defined in: extension/data/modules/shared/redditElements/deriveStatus.ts:15

Derives the moderation status and a human-readable “by on ” string from a raw Reddit comment or submission data object. Comments and submissions expose the same moderation fields (spam / removed / approved / ban_note), so both components share this.

Parameters

thing

ThingModData

The raw Reddit comment or submission data object.

Returns

object

status - one of 'neutral' | 'approved' | 'removed' | 'spammed'; actionByOn - the “by on ” string, with the ban note appended when present.

actionByOn

actionByOn: string

status

status: ThingStatus