mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 11:29:46 +00:00
getClientConnectUri: fix description value
This commit is contained in:
parent
3b0739f187
commit
dc8010a78e
1 changed files with 10 additions and 3 deletions
|
|
@ -1,14 +1,21 @@
|
|||
import { Conf } from '@/config.ts';
|
||||
import { getInstanceMetadata } from '@/utils/instance.ts';
|
||||
|
||||
/** NIP-46 client-connect metadata. */
|
||||
interface ConnectMetadata {
|
||||
name: string;
|
||||
description: string;
|
||||
url: string;
|
||||
}
|
||||
|
||||
/** Get NIP-46 `nostrconnect://` URI for the Ditto server. */
|
||||
export async function getClientConnectUri(signal?: AbortSignal): Promise<string> {
|
||||
const uri = new URL('nostrconnect://');
|
||||
const { name, description } = await getInstanceMetadata(signal);
|
||||
const { name, tagline } = await getInstanceMetadata(signal);
|
||||
|
||||
const metadata = {
|
||||
const metadata: ConnectMetadata = {
|
||||
name,
|
||||
description,
|
||||
description: tagline,
|
||||
url: Conf.localDomain,
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue