mirror of
https://activitypub.software/TransFem-org/Sharkey
synced 2024-12-22 16:30:13 +00:00
60 lines
1.3 KiB
TypeScript
60 lines
1.3 KiB
TypeScript
/*
|
|
* SPDX-FileCopyrightText: syuilo and misskey-project
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
*/
|
|
|
|
export const USER_ONLINE_THRESHOLD = 1000 * 60 * 10; // 10min
|
|
export const USER_ACTIVE_THRESHOLD = 1000 * 60 * 60 * 24 * 3; // 3days
|
|
|
|
export const PER_NOTE_REACTION_USER_PAIR_CACHE_MAX = 16;
|
|
|
|
// ブラウザで直接表示することを許可するファイルの種類のリスト
|
|
// ここに含まれないものは application/octet-stream としてレスポンスされる
|
|
// SVGはXSSを生むので許可しない
|
|
export const FILE_TYPE_BROWSERSAFE = [
|
|
// Images
|
|
'image/png',
|
|
'image/gif',
|
|
'image/jpeg',
|
|
'image/webp',
|
|
'image/avif',
|
|
'image/apng',
|
|
'image/bmp',
|
|
'image/tiff',
|
|
'image/x-icon',
|
|
|
|
// OggS
|
|
'audio/opus',
|
|
'video/ogg',
|
|
'audio/ogg',
|
|
'application/ogg',
|
|
|
|
// ISO/IEC base media file format
|
|
'video/quicktime',
|
|
'video/mp4',
|
|
'audio/mp4',
|
|
'video/x-m4v',
|
|
'audio/x-m4a',
|
|
'video/3gpp',
|
|
'video/3gpp2',
|
|
|
|
'video/mpeg',
|
|
'audio/mpeg',
|
|
|
|
'video/webm',
|
|
'audio/webm',
|
|
|
|
'audio/aac',
|
|
|
|
// see https://github.com/misskey-dev/misskey/pull/10686
|
|
'audio/flac',
|
|
'audio/wav',
|
|
// backward compatibility
|
|
'audio/x-flac',
|
|
'audio/vnd.wave',
|
|
];
|
|
/*
|
|
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
|
|
*/
|