nas/app/javascript/mastodon/models/antenna.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

24 lines
609 B
TypeScript

import type { RecordOf } from 'immutable';
import { Record } from 'immutable';
import type { ApiAntennaJSON } from 'mastodon/api_types/antennas';
type AntennaShape = Required<ApiAntennaJSON>; // no changes from server shape
export type Antenna = RecordOf<AntennaShape>;
const AntennaFactory = Record<AntennaShape>({
id: '',
title: '',
stl: false,
ltl: false,
insert_feeds: false,
with_media_only: false,
ignore_reblog: false,
favourite: true,
list: null,
list_id: undefined,
});
export function createAntenna(attributes: Partial<AntennaShape>) {
return AntennaFactory(attributes);
}