From 276594608c39223b331caa5168be6b39c81c53ab Mon Sep 17 00:00:00 2001 From: Vishal Date: Tue, 2 Aug 2022 12:12:41 +0530 Subject: [PATCH] Remove the read_channel permission to unfollow a thread (#20662) --- api4/user.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/api4/user.go b/api4/user.go index 56323550f4..c1d682e560 100644 --- a/api4/user.go +++ b/api4/user.go @@ -3172,11 +3172,6 @@ func unfollowThreadByUser(c *Context, w http.ResponseWriter, r *http.Request) { return } - if !c.App.SessionHasPermissionToChannelByPost(*c.AppContext.Session(), c.Params.ThreadId, model.PermissionReadChannel) { - c.SetPermissionError(model.PermissionReadChannel) - return - } - err := c.App.UpdateThreadFollowForUser(c.Params.UserId, c.Params.TeamId, c.Params.ThreadId, false) if err != nil { c.Err = err