aboutsummaryrefslogtreecommitdiffstats
path: root/lib/nostr.ts
diff options
context:
space:
mode:
Diffstat (limited to 'lib/nostr.ts')
-rw-r--r--lib/nostr.ts5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/nostr.ts b/lib/nostr.ts
index 82251baa..bf37779b 100644
--- a/lib/nostr.ts
+++ b/lib/nostr.ts
@@ -1,5 +1,5 @@
import config from "$config";
-import { db, g, s } from "$lib/db";
+import { g, s } from "$lib/db";
import { l } from "$lib/logging";
import { fail } from "$lib/utils";
import { finalizeEvent, getPublicKey, nip19 } from "nostr-tools";
@@ -119,12 +119,11 @@ export const getRelays = async (pubkey): Promise<any> => {
return { read, write };
};
-export const getProfile = async (pubkey) => {
+export const getProfile = async (pubkey, relays = [config.nostr]) => {
let profile = await g(`${pubkey}:profile`);
if (!profile) {
const pubkeys = [pubkey];
- let relays = [config.nostr];
let filter: any = { authors: pubkeys, kinds: [0] };
let ev = await pool.get(relays, filter, opts);