From c7db2c05247632f8c02d2d0989d0a895120598b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20Papp?= Date: Wed, 19 Jun 2024 18:40:49 +0200 Subject: [PATCH] Moc signal message support --- client/internal/peer/handshaker.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/client/internal/peer/handshaker.go b/client/internal/peer/handshaker.go index 86beb1f1e..8441fe64a 100644 --- a/client/internal/peer/handshaker.go +++ b/client/internal/peer/handshaker.go @@ -117,6 +117,10 @@ func (h *Handshaker) Handshake(args HandshakeArgs) (*OfferAnswer, error) { // OnRemoteOffer handles an offer from the remote peer and returns true if the message was accepted, false otherwise // doesn't block, discards the message if connection wasn't ready func (h *Handshaker) OnRemoteOffer(offer OfferAnswer) bool { + // todo remove this if signaling can support relay + if ForcedRelayAddress() != "" { + offer.RelaySrvAddress = ForcedRelayAddress() + } select { case h.remoteOffersCh <- offer: return true @@ -130,6 +134,10 @@ func (h *Handshaker) OnRemoteOffer(offer OfferAnswer) bool { // OnRemoteAnswer handles an offer from the remote peer and returns true if the message was accepted, false otherwise // doesn't block, discards the message if connection wasn't ready func (h *Handshaker) OnRemoteAnswer(answer OfferAnswer) bool { + // todo remove this if signaling can support relay + if ForcedRelayAddress() != "" { + answer.RelaySrvAddress = ForcedRelayAddress() + } select { case h.remoteAnswerCh <- answer: return true