nas/app/javascript/mastodon/models/list.ts
KMY(雪あすか) 9201eb151b
Add: #920 アンテナ・リストに「お気に入りに登録」設定 (#946)
* Add: #920 アンテナ・リストに「お気に入りに登録」設定

* Fix test

* Fix test

* Add fedibird capabilities

* Add kmyblue_favourite_antenna
2024-12-09 12:12:15 +09:00

21 lines
518 B
TypeScript

import type { RecordOf } from 'immutable';
import { Record } from 'immutable';
import type { ApiListJSON } from 'mastodon/api_types/lists';
type ListShape = Required<ApiListJSON>; // no changes from server shape
export type List = RecordOf<ListShape>;
const ListFactory = Record<ListShape>({
id: '',
title: '',
exclusive: false,
replies_policy: 'list',
notify: false,
favourite: true,
antennas: [],
});
export function createList(attributes: Partial<ListShape>) {
return ListFactory(attributes);
}