summaryrefslogtreecommitdiff
path: root/packages/backend/src/models
diff options
context:
space:
mode:
authorおさむのひと <46447427+samunohito@users.noreply.github.com>2024-03-21 18:46:42 +0900
committerGitHub <noreply@github.com>2024-03-21 18:46:42 +0900
commit831c74a25b2db0ba3f6d43a9a1a9072d342b2822 (patch)
tree5ad9371369ef6a346e0ca27bc6dea1682044df52 /packages/backend/src/models
parentenhance(antenna): Botの投稿を除外できるように (#13603) (diff)
downloadmisskey-831c74a25b2db0ba3f6d43a9a1a9072d342b2822.tar.gz
misskey-831c74a25b2db0ba3f6d43a9a1a9072d342b2822.tar.bz2
misskey-831c74a25b2db0ba3f6d43a9a1a9072d342b2822.zip
fix: URLプレビューの動作改善+動作設定を可能にする (#13579)
* wip * support new version * URLプレビュー無効化時、フロント側も非表示にしてリクエストをしないようにする * fix lint * fix lint * tweak preview request error handles * fix: CHANGELOG.md * fix * fix --------- Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com>
Diffstat (limited to 'packages/backend/src/models')
-rw-r--r--packages/backend/src/models/Meta.ts38
-rw-r--r--packages/backend/src/models/json-schema/meta.ts4
2 files changed, 36 insertions, 6 deletions
diff --git a/packages/backend/src/models/Meta.ts b/packages/backend/src/models/Meta.ts
index 66f19ce197..04a34bbbb4 100644
--- a/packages/backend/src/models/Meta.ts
+++ b/packages/backend/src/models/Meta.ts
@@ -277,12 +277,6 @@ export class MiMeta {
})
public enableSensitiveMediaDetectionForVideos: boolean;
- @Column('varchar', {
- length: 1024,
- nullable: true,
- })
- public summalyProxy: string | null;
-
@Column('boolean', {
default: false,
})
@@ -588,4 +582,36 @@ export class MiMeta {
default: 0,
})
public notesPerOneAd: number;
+
+ @Column('boolean', {
+ default: true,
+ })
+ public urlPreviewEnabled: boolean;
+
+ @Column('integer', {
+ default: 10000,
+ })
+ public urlPreviewTimeout: number;
+
+ @Column('bigint', {
+ default: 1024 * 1024 * 10,
+ })
+ public urlPreviewMaximumContentLength: number;
+
+ @Column('boolean', {
+ default: true,
+ })
+ public urlPreviewRequireContentLength: boolean;
+
+ @Column('varchar', {
+ length: 1024,
+ nullable: true,
+ })
+ public urlPreviewSummaryProxyUrl: string | null;
+
+ @Column('varchar', {
+ length: 1024,
+ nullable: true,
+ })
+ public urlPreviewUserAgent: string | null;
}
diff --git a/packages/backend/src/models/json-schema/meta.ts b/packages/backend/src/models/json-schema/meta.ts
index 17789f3b46..473339a1ad 100644
--- a/packages/backend/src/models/json-schema/meta.ts
+++ b/packages/backend/src/models/json-schema/meta.ts
@@ -207,6 +207,10 @@ export const packedMetaLiteSchema = {
type: 'string',
optional: false, nullable: false,
},
+ enableUrlPreview: {
+ type: 'boolean',
+ optional: false, nullable: false,
+ },
backgroundImageUrl: {
type: 'string',
optional: false, nullable: true,