2022-07-08 16:09:57 -07:00
|
|
|
/** Notification types known to Soapbox. */
|
|
|
|
const NOTIFICATION_TYPES = [
|
|
|
|
'follow',
|
|
|
|
'follow_request',
|
|
|
|
'mention',
|
|
|
|
'reblog',
|
|
|
|
'favourite',
|
|
|
|
'poll',
|
|
|
|
'status',
|
|
|
|
'move',
|
|
|
|
'pleroma:chat_mention',
|
|
|
|
'pleroma:emoji_reaction',
|
|
|
|
'user_approved',
|
2022-07-27 14:47:16 -07:00
|
|
|
'update',
|
2022-09-25 14:18:11 -07:00
|
|
|
'pleroma:event_reminder',
|
|
|
|
'pleroma:participation_request',
|
|
|
|
'pleroma:participation_accepted',
|
2022-07-08 16:09:57 -07:00
|
|
|
] as const;
|
|
|
|
|
2022-11-04 11:02:23 -07:00
|
|
|
/** Notification types to exclude from the "All" filter by default. */
|
|
|
|
const EXCLUDE_TYPES = [
|
|
|
|
'pleroma:chat_mention',
|
|
|
|
'chat', // TruthSocial
|
|
|
|
] as const;
|
|
|
|
|
2022-07-08 16:09:57 -07:00
|
|
|
type NotificationType = typeof NOTIFICATION_TYPES[number];
|
|
|
|
|
|
|
|
/** Ensure the Notification is a valid, known type. */
|
|
|
|
const validType = (type: string): type is NotificationType => NOTIFICATION_TYPES.includes(type as any);
|
|
|
|
|
|
|
|
export {
|
|
|
|
NOTIFICATION_TYPES,
|
2022-11-04 11:02:23 -07:00
|
|
|
EXCLUDE_TYPES,
|
2022-07-08 16:09:57 -07:00
|
|
|
NotificationType,
|
|
|
|
validType,
|
|
|
|
};
|