Check protocol

This commit is contained in:
koalasat
2025-05-20 14:07:37 +02:00
parent ac0c489da2
commit d2a1a74a1c

View File

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