1
0
Fork 0
forked from gitea/nas

Add: #699 引用・参照対応サーバーをAPIで取得 (#711)

* Add: #699 引用・参照対応サーバーをAPIで取得

* Complete

* ごめん
This commit is contained in:
KMY(雪あすか) 2024-04-16 12:58:54 +09:00 committed by GitHub
parent 78b2707c08
commit 1c054ed3a3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
22 changed files with 129 additions and 29 deletions

View file

@ -8,6 +8,7 @@ import type {
ApiAccountRoleJSON,
ApiAccountOtherSettingsJSON,
ApiAccountJSON,
ApiServerFeaturesJSON,
} from 'mastodon/api_types/accounts';
import type { ApiCustomEmojiJSON } from 'mastodon/api_types/custom_emoji';
import emojify from 'mastodon/features/emoji/emoji';
@ -61,6 +62,18 @@ const AccountOtherSettingsFactory = ImmutableRecord<AccountOtherSettingsShape>({
subscription_policy: 'allow',
});
// ServerFeatures
export type AccountServerFeaturesShape = ApiServerFeaturesJSON;
export type AccountServerFeatures = RecordOf<AccountServerFeaturesShape>;
const AccountServerFeaturesFactory =
ImmutableRecord<AccountServerFeaturesShape>({
circle: false,
emoji_reaction: false,
quote: false,
status_reference: false,
});
// Account
export interface AccountShape
extends Required<
@ -88,6 +101,7 @@ export const accountDefaultValues: AccountShape = {
indexable: false,
display_name: '',
display_name_html: '',
server_features: AccountServerFeaturesFactory(),
emoji_reaction_available_server: false,
emojis: List<CustomEmoji>(),
fields: List<AccountField>(),