1
0
mirror of https://github.com/mattermost/focalboard.git synced 2025-07-15 23:54:29 +02:00

Showing properly channel association in DMs and GMs (#3529)

This commit is contained in:
Jesús Espino
2022-08-04 00:36:37 +02:00
committed by GitHub
parent 6350263f68
commit d754b498a1
3 changed files with 34 additions and 5 deletions

View File

@ -20,6 +20,7 @@ import (
"github.com/mattermost/focalboard/server/services/permissions"
"github.com/mattermost/focalboard/server/utils"
mmModel "github.com/mattermost/mattermost-server/v6/model"
"github.com/mattermost/mattermost-server/v6/shared/mlog"
)
@ -2389,8 +2390,10 @@ func (a *API) handleGetChannel(w http.ResponseWriter, r *http.Request) {
)
if channel.TeamId != teamID {
a.errorResponse(w, r.URL.Path, http.StatusNotFound, "", nil)
return
if channel.Type != mmModel.ChannelTypeDirect && channel.Type != mmModel.ChannelTypeGroup {
a.errorResponse(w, r.URL.Path, http.StatusNotFound, "", nil)
return
}
}
data, err := json.Marshal(channel)