Skip to content

Commit

Permalink
fix client unsubscribe channel (#79)
Browse files Browse the repository at this point in the history
  • Loading branch information
hongnguyenhuu96 authored Feb 18, 2020
1 parent 65a903c commit 2dd43cd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/app/api/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -365,8 +365,8 @@ func (c *Client) Unsubscribe(ID string, channels []string) (bool, error) {
return false, err
}

for i, channel := range channels {
if validator.IsIn(channel, clientResult.Channels) {
for i, channel := range clientResult.Channels {
if validator.IsIn(channel, channels) {
ok, err := c.RemoveFromChannel(ID, channel)
if !ok || err != nil {
return false, err
Expand Down

0 comments on commit 2dd43cd

Please sign in to comment.