diff --git a/packages/backend-rs/index.d.ts b/packages/backend-rs/index.d.ts index e32025b151..31e8ef9174 100644 --- a/packages/backend-rs/index.d.ts +++ b/packages/backend-rs/index.d.ts @@ -13,9 +13,9 @@ export const USER_ACTIVE_THRESHOLD: number * List of file types allowed to be viewed directly in the browser * Anything not included here will be responded as application/octet-stream * SVG is not allowed because it generates XSS <- we need to fix this and later allow it to be viewed directly - * https://github.com/sindresorhus/file-type/blob/main/supported.js - * https://github.com/sindresorhus/file-type/blob/main/core.js - * https://developer.mozilla.org/en-US/docs/Web/Media/Formats/Containers + * * + * * + * * */ export const FILE_TYPE_BROWSERSAFE: string[] export interface EnvConfig { @@ -240,7 +240,6 @@ export interface ImageSize { height: number } export function getImageSizeFromUrl(url: string): Promise -/** TODO: handle name collisions better */ export interface NoteLikeForAllTexts { fileIds: Array userId: string @@ -1175,7 +1174,7 @@ export function updateAntennasOnNewNote(note: Note, noteAuthor: Acct, noteMutedU export function fetchNodeinfo(host: string): Promise export function nodeinfo_2_1(): Promise export function nodeinfo_2_0(): Promise -/** NodeInfo schema version 2.0. https://nodeinfo.diaspora.software/docson/index.html#/ns/schema/2.0 */ +/** NodeInfo schema version 2.0. */ export interface Nodeinfo { /** The schema version, must be 2.0. */ version: string @@ -1324,7 +1323,7 @@ export function getTimestamp(id: string): number * With the length of 16, namely 8 for cuid2, roughly 1427399 IDs are needed * in the same millisecond to reach 50% chance of collision. * - * Ref: https://github.com/paralleldrive/cuid2#parameterized-length + * Ref: */ export function genId(): string /** Generate an ID using a specific datetime */ diff --git a/packages/backend-rs/src/config/constant.rs b/packages/backend-rs/src/config/constant.rs index 7f71a230b5..e0e7c7459a 100644 --- a/packages/backend-rs/src/config/constant.rs +++ b/packages/backend-rs/src/config/constant.rs @@ -15,9 +15,9 @@ pub const USER_ACTIVE_THRESHOLD: i32 = 3 * DAY; /// List of file types allowed to be viewed directly in the browser /// Anything not included here will be responded as application/octet-stream /// SVG is not allowed because it generates XSS <- we need to fix this and later allow it to be viewed directly -/// -/// -/// +/// * +/// * +/// * #[crate::export] pub const FILE_TYPE_BROWSERSAFE: [&str; 41] = [ // Images