diff --git a/packages/pl-api/lib/features.ts b/packages/pl-api/lib/features.ts index 3ed3457c8..5b040701e 100644 --- a/packages/pl-api/lib/features.ts +++ b/packages/pl-api/lib/features.ts @@ -1067,6 +1067,11 @@ const getFeatures = (instance: Instance) => { v.software === PLEROMA, ]), + /** + * @see GET /api/v1/notifications + */ + notificationsExcludeTypes: v.software !== MITRA, + /** * @see GET /api/v1/notifications */ diff --git a/packages/pl-api/lib/params/settings.ts b/packages/pl-api/lib/params/settings.ts index fd4047725..238ae51c8 100644 --- a/packages/pl-api/lib/params/settings.ts +++ b/packages/pl-api/lib/params/settings.ts @@ -1,7 +1,7 @@ /** * @category Request params */ -interface CreateAccountParams { +type CreateAccountParams = { /** String. The desired username for the account */ username: string; /** String. The email address to be used for login */ @@ -31,7 +31,15 @@ interface CreateAccountParams { domain?: string; accepts_email_list?: boolean; -} + + /** Invite code */ + invite_code?: string; +} & ({ + /** EIP-4361 message */ + message: string; + /** EIP-4361 signature (required if message is present) */ + signature: string; +} | {}) /** * @category Request params diff --git a/packages/pl-api/package.json b/packages/pl-api/package.json index e40853aa0..9dce0040c 100644 --- a/packages/pl-api/package.json +++ b/packages/pl-api/package.json @@ -1,6 +1,6 @@ { "name": "pl-api", - "version": "1.0.0-rc.40", + "version": "1.0.0-rc.41", "type": "module", "homepage": "https://github.com/mkljczk/pl-fe/tree/develop/packages/pl-api", "repository": { diff --git a/packages/pl-fe/src/features/notifications/index.tsx b/packages/pl-fe/src/features/notifications/index.tsx index cfc13d61e..77ddbac2f 100644 --- a/packages/pl-fe/src/features/notifications/index.tsx +++ b/packages/pl-fe/src/features/notifications/index.tsx @@ -17,6 +17,7 @@ import Portal from 'pl-fe/components/ui/portal'; import PlaceholderNotification from 'pl-fe/features/placeholder/components/placeholder-notification'; import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; +import { useFeatures } from 'pl-fe/hooks/use-features'; import { useSettings } from 'pl-fe/hooks/use-settings'; import FilterBar from './components/filter-bar'; @@ -54,10 +55,11 @@ const getNotifications = createSelector([ const Notifications = () => { const dispatch = useAppDispatch(); + const features = useFeatures(); const intl = useIntl(); const settings = useSettings(); - const showFilterBar = settings.notifications.quickFilter.show; + const showFilterBar = (features.notificationsExcludeTypes || features.notificationsIncludeTypes) && settings.notifications.quickFilter.show; const activeFilter = settings.notifications.quickFilter.active; const [topNotification, setTopNotification] = useState(); const { queuedNotificationCount, displayedNotifications } = useAppSelector(state => getNotifications(state, topNotification)); @@ -188,7 +190,7 @@ const Notifications = () => { ); return ( - + {filterBarContainer}