convert Authorized Fetch to a setting and add support for hybrid mode (essential metadata only)

This commit is contained in:
Hazelnoot 2025-02-21 22:04:36 -05:00
parent e3d949ced6
commit a35c2f214b
28 changed files with 517 additions and 103 deletions

View file

@ -33,6 +33,7 @@ import type { Config } from '@/config.js';
import { safeForSql } from '@/misc/safe-for-sql.js';
import { AvatarDecorationService } from '@/core/AvatarDecorationService.js';
import { notificationRecieveConfig } from '@/models/json-schema/user.js';
import { userUnsignedFetchOptions } from '@/const.js';
import { ApiLoggerService } from '../../ApiLoggerService.js';
import { ApiError } from '../../error.js';
@ -255,6 +256,11 @@ export const paramDef = {
enum: ['default', 'parent', 'defaultParent', 'parentDefault'],
nullable: false,
},
allowUnsignedFetch: {
type: 'string',
enum: userUnsignedFetchOptions,
nullable: false,
},
},
} as const;
@ -519,6 +525,10 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
profileUpdates.defaultCWPriority = ps.defaultCWPriority;
}
if (ps.allowUnsignedFetch !== undefined) {
updates.allowUnsignedFetch = ps.allowUnsignedFetch;
}
//#region emojis/tags
let emojis = [] as string[];