diff --git a/src/actions/statuses.ts b/src/actions/statuses.ts index ae704e4a3..94b86ac33 100644 --- a/src/actions/statuses.ts +++ b/src/actions/statuses.ts @@ -1,4 +1,5 @@ import { Status as StatusEntity } from 'soapbox/schemas/index.ts'; +import { settingsSchema } from 'soapbox/schemas/soapbox/settings.ts'; import { isLoggedIn } from 'soapbox/utils/auth.ts'; import { getFeatures } from 'soapbox/utils/features.ts'; import { shouldHaveCard } from 'soapbox/utils/status.ts'; @@ -9,6 +10,7 @@ import { setComposeToStatus } from './compose-status.ts'; import { fetchGroupRelationships } from './groups.ts'; import { importFetchedStatus, importFetchedStatuses } from './importer/index.ts'; import { openModal } from './modals.ts'; +import { getSettings } from './settings.ts'; import { deleteFromTimelines } from './timelines.ts'; import type { AppDispatch, RootState } from 'soapbox/store.ts'; @@ -58,6 +60,12 @@ const statusExists = (getState: () => RootState, statusId: string) => { const createStatus = (params: Record, idempotencyKey: string, statusId: string | null) => { return (dispatch: AppDispatch, getState: () => RootState) => { + const settings = settingsSchema.parse(getSettings(getState()).toJS()); + + if (settings.discloseClient) { + params.disclose_client = true; + } + dispatch({ type: STATUS_CREATE_REQUEST, params, idempotencyKey, editing: !!statusId }); const method = statusId === null ? 'POST' : 'PUT'; diff --git a/src/features/preferences/index.tsx b/src/features/preferences/index.tsx index e52921d40..44d58017d 100644 --- a/src/features/preferences/index.tsx +++ b/src/features/preferences/index.tsx @@ -166,6 +166,12 @@ const Preferences = () => { )} + {features.nostr && ( + }> + + + )} + {features.richText && ( }> = ({ {statusTypeIcon} + {actualStatus.application && ( + <> + {actualStatus.application.get('website') ? ( + + + {actualStatus.application.get('name')} + + + ) : ( + + {actualStatus.application.get('name')} + + )} + {/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */} + {' · '} + + )} + @@ -189,7 +207,8 @@ const DetailedStatus: React.FC = ({ {actualStatus.edited_at && ( <> - {' · '} + {/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */} + {' · '}