InterfaceNotificationPolicy

Represents the notification filtering policy of the user.

interface NotificationPolicy {
    forLimitedAccounts: NotificationPolicyType;
    forNewAccounts: NotificationPolicyType;
    forNotFollowers: NotificationPolicyType;
    forNotFollowing: NotificationPolicyType;
    forPrivateMentions: NotificationPolicyType;
    summary: {
        pendingNotificationsCount: number;
        pendingRequestsCount: number;
    };
}

Properties

forLimitedAccounts: NotificationPolicyType

Whether to accept, filter or drop notifications from accounts that were limited by a moderator. drop will prevent creation of the notification object altogether (without preventing the underlying activity), filter will cause it to be marked as filtered, and accept will not affect its processing. Type: String (one of accept, filter or drop)

forNewAccounts: NotificationPolicyType

Whether to filter notifications from accounts created in the past 30 days.

forNotFollowers: NotificationPolicyType

Whether to filter notifications from accounts that are not following the user.

forNotFollowing: NotificationPolicyType

Whether to filter notifications from accounts the user is not following.

forPrivateMentions: NotificationPolicyType

Whether to filter notifications from private mentions. Replies to private mentions initiated by the user, as well as accounts the user follows, are never filtered.

summary: {
    pendingNotificationsCount: number;
    pendingRequestsCount: number;
}

Summary of the filtered notifications

Type declaration

  • pendingNotificationsCount: number

    Number of total non-dismissed filtered notifications. May be inaccurate.

  • pendingRequestsCount: number

    Number of different accounts from which the user has non-dismissed filtered notifications. Capped at 100. Type: Integer