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

Commit

Permalink
Send relay message to all configured relays
Browse files Browse the repository at this point in the history
  • Loading branch information
hoffmabc committed Nov 9, 2019
1 parent 74bcbce commit a805f45
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions net/web_relay_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,10 @@ func (wrm *WebRelayManager) SendRelayMessage(ciphertext string, recipient string
outgoing, _ := json.Marshal(typedmessage)
log.Debugf("Sending encrypted relay message: %s", string(outgoing))

// Transmit the encrypted message to the webrelay
wrm.authToWebRelay(wrm.webrelays[0], outgoing)
// Transmit the encrypted message to each configured web relay
for _, relay := range wrm.webrelays {
wrm.authToWebRelay(relay, outgoing)
}
}

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

}
}

Expand Down

0 comments on commit a805f45

Please sign in to comment.