fix join response

This commit is contained in:
Asim Aslam
2022-02-17 16:41:35 +00:00
parent c49ee7e8b1
commit 2bb2bcc4b4
5 changed files with 220 additions and 151 deletions

View File

@@ -403,7 +403,7 @@ func (c *Chat) Join(ctx context.Context, req *pb.JoinRequest, stream pb.Chat_Joi
}
// publish the message to the stream
if err := stream.Send(&msg); err != nil {
if err := stream.Send(&pb.JoinResponse{Message: &msg}); err != nil {
logger.Errorf("Error sending message to stream. ChatID: %v. Message ID: %v. Error: %v", msg.RoomId, msg.Id, err)
errChan <- err
return nil