mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 11:29:46 +00:00
add the ditto.external field to statuses and accounts
This commit is contained in:
parent
60b4ea4643
commit
f19afa449a
4 changed files with 8 additions and 0 deletions
|
|
@ -40,6 +40,7 @@ export interface MastodonAccount {
|
|||
username: string;
|
||||
ditto: {
|
||||
accepts_zaps: boolean;
|
||||
external?: URL;
|
||||
};
|
||||
pleroma: {
|
||||
deactivated: boolean;
|
||||
|
|
|
|||
|
|
@ -39,4 +39,7 @@ export interface MastodonStatus {
|
|||
expires_at?: string;
|
||||
quotes_count: number;
|
||||
};
|
||||
ditto: {
|
||||
external?: URL;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -82,6 +82,7 @@ async function renderAccount(
|
|||
username: parsed05?.nickname || npub.substring(0, 8),
|
||||
ditto: {
|
||||
accepts_zaps: Boolean(getLnurl({ lud06, lud16 })),
|
||||
external: Conf.externalDomain === Conf.localDomain ? undefined : Conf.external(npub),
|
||||
},
|
||||
pleroma: {
|
||||
deactivated: names.has('disabled'),
|
||||
|
|
|
|||
|
|
@ -124,6 +124,9 @@ async function renderStatus(event: DittoEvent, opts: RenderStatusOpts): Promise<
|
|||
uri: Conf.local(`/${note}`),
|
||||
url: Conf.local(`/${note}`),
|
||||
zapped: Boolean(zapEvent),
|
||||
ditto: {
|
||||
external: Conf.externalDomain === Conf.localDomain ? undefined : Conf.external(note),
|
||||
},
|
||||
pleroma: {
|
||||
emoji_reactions: reactions,
|
||||
expires_at: !isNaN(expiresAt.getTime()) ? expiresAt.toISOString() : undefined,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue