Move parseBunkerUrl to static method, add getBunkerUrl

This commit is contained in:
Jon Staab
2025-01-22 09:46:48 -08:00
parent d636abb0a6
commit 2353cce832
3 changed files with 47 additions and 19 deletions
+5 -1
View File
@@ -179,7 +179,11 @@ export class Router {
Quote = (event: TrustedEvent, value: string, relays: string[] = []) => {
const tag = event.tags.find(t => t[1] === value)
const scenarios = [this.ForPubkey(event.pubkey), this.FromPubkey(event.pubkey)]
const scenarios = [
this.FromRelays(relays),
this.ForPubkey(event.pubkey),
this.FromPubkey(event.pubkey),
]
if (tag?.[2] && isShareableRelayUrl(tag[2])) {
scenarios.push(this.FromRelays([tag[2]]))