mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
Only check team Id in getChannel for non-DMs (#3382)
This commit is contained in:
committed by
Christopher Speller
parent
86d3c32a24
commit
878465b528
@@ -784,7 +784,7 @@ func getChannel(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
member := cmresult.Data.(model.ChannelMember)
|
||||
data.Member = &member
|
||||
|
||||
if data.Channel.TeamId != c.TeamId {
|
||||
if data.Channel.TeamId != c.TeamId && data.Channel.Type != model.CHANNEL_DIRECT {
|
||||
c.Err = model.NewLocAppError("getChannel", "api.channel.get_channel.wrong_team.app_error", map[string]interface{}{"ChannelId": id, "TeamId": c.TeamId}, "")
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user