pl-fe: fix #44

Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
This commit is contained in:
nicole mikołajczyk
2025-07-28 00:22:39 +02:00
parent bde5354a92
commit 34e4241770
6 changed files with 9 additions and 7 deletions

View File

@ -103,6 +103,7 @@ const baseStatusSchema = v.object({
dislikes_count: v.fallback(v.number(), 0),
disliked: v.fallback(v.pipe(v.unknown(), v.transform(Boolean)), false),
local_only: v.fallback(v.optional(v.boolean()), undefined),
interaction_policy: interactionPolicySchema,
content_type: v.fallback(v.nullable(v.string()), null),

View File

@ -1,6 +1,6 @@
{
"name": "pl-api",
"version": "1.0.0-rc.87",
"version": "1.0.0-rc.88",
"type": "module",
"homepage": "https://codeberg.org/mkljczk/pl-fe/src/branch/develop/packages/pl-api",
"repository": {

View File

@ -105,7 +105,7 @@
"multiselect-react-dropdown": "^2.0.25",
"mutative": "^1.1.0",
"path-browserify": "^1.0.1",
"pl-api": "^1.0.0-rc.87",
"pl-api": "^1.0.0-rc.88",
"postcss": "^8.5.3",
"process": "^0.11.10",
"punycode": "^2.1.1",

View File

@ -170,7 +170,7 @@ const changeCompose = (composeId: string, text: string) => ({
interface ComposeReplyAction {
type: typeof COMPOSE_REPLY;
composeId: string;
status: Pick<Status, 'id' | 'account' | 'group_id' | 'list_id' | 'mentions' | 'spoiler_text' | 'visibility'>;
status: Pick<Status, 'id' | 'account' | 'group_id' | 'list_id' | 'local_only' | 'mentions' | 'spoiler_text' | 'visibility'>;
account: Pick<Account, 'acct'>;
explicitAddressing: boolean;
preserveSpoilers: boolean;

View File

@ -399,6 +399,7 @@ const compose = (state = initialState, action: ComposeAction | EventsAction | In
compose.parent_reblogged_by = action.rebloggedBy?.id || null;
compose.text = !action.explicitAddressing ? statusToTextMentions(action.status, action.account) : '';
compose.privacy = privacyPreference(action.status.visibility, defaultCompose.privacy, action.status.list_id);
compose.federated = action.status.local_only !== true;
compose.focusDate = new Date();
compose.caretPosition = null;
compose.idempotencyKey = crypto.randomUUID();

View File

@ -6998,10 +6998,10 @@ pkg-dir@^4.1.0:
dependencies:
find-up "^4.0.0"
pl-api@^1.0.0-rc.87:
version "1.0.0-rc.87"
resolved "https://registry.yarnpkg.com/pl-api/-/pl-api-1.0.0-rc.87.tgz#e02573c61697d51d6df1ccc64a061173d18ce1dd"
integrity sha512-ng+7nBP5RiREmOjs9ot8SObvNc1lHRsEA7za8w6HDSGVFOf4VGBaYRRxO2dKLFkxk1ViRm2z5cWssN2mKk8xjQ==
pl-api@^1.0.0-rc.88:
version "1.0.0-rc.88"
resolved "https://registry.yarnpkg.com/pl-api/-/pl-api-1.0.0-rc.88.tgz#569da6057b8e16cfe3442a5fb9391fe86d80f8f1"
integrity sha512-h3gCwm4w7D9U2RRoDw+tmnVabO+ly5q96/NtdsHYRVajCiGeJFce647gSKzPuF3rPfhn9RJRsnIfiekFZydYaQ==
dependencies:
blurhash "^2.0.5"
http-link-header "^1.1.3"