Skip to content

Commit

Permalink
fix: message type in the signal implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
braginini committed May 1, 2021
1 parent 6cd44f1 commit 4e348b7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions signal/signal.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func NewServer() *SignalExchangeServer {
}
}

func (s *SignalExchangeServer) Send(ctx context.Context, msg *proto.EncryptedMessage) (*proto.Message, error) {
func (s *SignalExchangeServer) Send(ctx context.Context, msg *proto.EncryptedMessage) (*proto.EncryptedMessage, error) {

if _, found := s.registry.Peers[msg.Key]; !found {
return nil, fmt.Errorf("unknown peer %s", msg.Key)
Expand All @@ -44,7 +44,7 @@ func (s *SignalExchangeServer) Send(ctx context.Context, msg *proto.EncryptedMes
log.Warnf("message from peer [%s] can't be forwarded to peer [%s] because destination peer is not connected", msg.Key, msg.RemoteKey)
//todo respond to the sender?
}
return &proto.Message{}, nil
return &proto.EncryptedMessage{}, nil
}

func (s *SignalExchangeServer) ConnectStream(stream proto.SignalExchange_ConnectStreamServer) error {
Expand Down

0 comments on commit 4e348b7

Please sign in to comment.