diff --git a/src/app/commands.ts b/src/app/commands.ts index d03c411..5abcf61 100644 --- a/src/app/commands.ts +++ b/src/app/commands.ts @@ -1,5 +1,5 @@ import {get} from "svelte/store" -import {ctx, sample, uniq, sleep, chunk, equals, choice} from "@welshman/lib" +import {ctx, sample, uniq, sleep, chunk, equals} from "@welshman/lib" import { DELETE, PROFILE, @@ -85,19 +85,6 @@ export const getPubkeyPetname = (pubkey: string) => { return display } -export const makeMention = (pubkey: string, hints?: string[]) => [ - "p", - pubkey, - choice(hints || getPubkeyHints(pubkey)), - getPubkeyPetname(pubkey), -] - -export const makeIMeta = (url: string, data: Record) => [ - "imeta", - `url ${url}`, - ...Object.entries(data).map(([k, v]) => [k, v].join(" ")), -] - export const getThunkError = async (thunk: Thunk) => { const result = await thunk.result const [{status, message}] = Object.values(result) as any @@ -342,7 +329,7 @@ export const checkRelayAccess = async (url: string, claim = "") => { const result = await thunk.result - if (result[url].status !== PublishStatus.Success) { + if (result[url].status === PublishStatus.Failure) { const message = connection.auth.message?.replace(/^.*: /, "") || result[url].message?.replace(/^.*: /, "") || diff --git a/src/app/components/SpaceAuthError.svelte b/src/app/components/SpaceAuthError.svelte index 8504378..9b3959d 100644 --- a/src/app/components/SpaceAuthError.svelte +++ b/src/app/components/SpaceAuthError.svelte @@ -1,4 +1,5 @@