Skip to content
This repository was archived by the owner on Mar 28, 2023. It is now read-only.

Commit a805f45

Browse files
committed
Send relay message to all configured relays
1 parent 74bcbce commit a805f45

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

net/web_relay_manager.go

+4-3
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,10 @@ func (wrm *WebRelayManager) SendRelayMessage(ciphertext string, recipient string
192192
outgoing, _ := json.Marshal(typedmessage)
193193
log.Debugf("Sending encrypted relay message: %s", string(outgoing))
194194

195-
// Transmit the encrypted message to the webrelay
196-
wrm.authToWebRelay(wrm.webrelays[0], outgoing)
195+
// Transmit the encrypted message to each configured web relay
196+
for _, relay := range wrm.webrelays {
197+
wrm.authToWebRelay(relay, outgoing)
198+
}
197199
}
198200

199201
func (wrm *WebRelayManager) authToWebRelay(server string, msg []byte) {
@@ -205,7 +207,6 @@ func (wrm *WebRelayManager) authToWebRelay(server string, msg []byte) {
205207
} else {
206208
log.Debugf("Successfully sent message to relay: %s\n", conn.RemoteAddr())
207209
}
208-
209210
}
210211
}
211212

0 commit comments

Comments
 (0)