make changes according to 24-06-24 review

This commit is contained in:
Siddharth Singh 2024-06-24 02:34:49 +05:30
parent f19afa449a
commit 3f7687d59f
No known key found for this signature in database
5 changed files with 5 additions and 5 deletions

View file

@ -69,7 +69,7 @@ class Conf {
}
/** Get a link to a nip19-encoded entity in the configured external viewer. */
static external(path: string) {
return new URL(path, Conf.externalDomain);
return new URL(path, Conf.externalDomain).toString();
}
/**
* Heroku-style database URL. This is used in production to connect to the

View file

@ -40,7 +40,7 @@ export interface MastodonAccount {
username: string;
ditto: {
accepts_zaps: boolean;
external?: URL;
external_url: string;
};
pleroma: {
deactivated: boolean;

View file

@ -40,6 +40,6 @@ export interface MastodonStatus {
quotes_count: number;
};
ditto: {
external?: URL;
external_url: string;
};
}

View file

@ -82,7 +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),
external_url: Conf.external(npub),
},
pleroma: {
deactivated: names.has('disabled'),

View file

@ -125,7 +125,7 @@ async function renderStatus(event: DittoEvent, opts: RenderStatusOpts): Promise<
url: Conf.local(`/${note}`),
zapped: Boolean(zapEvent),
ditto: {
external: Conf.externalDomain === Conf.localDomain ? undefined : Conf.external(note),
external_url: Conf.external(note),
},
pleroma: {
emoji_reactions: reactions,