Skip to content

Commit

Permalink
Merge pull request #36 from nikhilnarayanan623/nikhilnarayanan623-pat…
Browse files Browse the repository at this point in the history
…ch-3

Update socket.go
  • Loading branch information
nikhilnarayanan623 authored Aug 24, 2023
2 parents b036704 + 1564fcb commit 29ddc88
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/pkg/api/service/socket.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ type webSocketService struct {
}

type Message struct {
RecieverID uint `json:"reciever_id"`
ReceiverID uint `json:"receiver_id"`
Content string `json:"content"`
}

Expand Down Expand Up @@ -150,7 +150,7 @@ func (c *webSocketService) sendMessge(messge Message) (received bool, err error)
c.mu.Lock()
defer c.mu.Unlock()
// find other connection
conn, ok := c.connections[messge.RecieverID]
conn, ok := c.connections[messge.ReceiverID]
if !ok {
return false, nil
}
Expand Down

0 comments on commit 29ddc88

Please sign in to comment.