Fix relay conection

This commit is contained in:
koalasat
2025-05-20 11:54:35 +02:00
parent 4fd1821a11
commit 5fd0758308
2 changed files with 3 additions and 3 deletions

View File

@ -306,9 +306,9 @@ export class Coordinator {
getRelayUrl = (network: 'mainnet' | 'testnet', hostUrl: string, selfHosted: boolean): string => { getRelayUrl = (network: 'mainnet' | 'testnet', hostUrl: string, selfHosted: boolean): string => {
if (selfHosted && this.shortAlias !== 'local') { if (selfHosted && this.shortAlias !== 'local') {
return `ws://${hostUrl.replace(/^https?:\/\//, '')}/${network}/${this.shortAlias}/relay`; return `ws://${hostUrl.replace(/^https?:\/\//, '')}/${network}/${this.shortAlias}/relay/`;
} else { } else {
return `ws://${this.url.replace(/^https?:\/\//, '')}/relay`; return `ws://${this.url.replace(/^https?:\/\//, '')}/relay/`;
} }
}; };
} }

View File

@ -19,7 +19,7 @@ class RoboPool {
); );
if (settings.host) { if (settings.host) {
const hostNostr = `ws://${settings.host.replace(/^https?:\/\//, '')}/relay`; const hostNostr = `ws://${settings.host.replace(/^https?:\/\//, '')}/relay/`;
if (federationRelays.includes(hostNostr)) { if (federationRelays.includes(hostNostr)) {
this.relays.push(hostNostr); this.relays.push(hostNostr);
} }