[MM-32622] Remove app.WaitForChannelMembership() (#17048)
* Remove app.WaitForChannelMembership * Fix tests * Fix test Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
4ba0c09fc7
Коммит
ee3f986da0
@@ -4,6 +4,7 @@
|
||||
package app
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
@@ -175,7 +176,7 @@ func (a *App) HasPermissionToChannel(askingUserId string, channelID string, perm
|
||||
return false
|
||||
}
|
||||
|
||||
channelMember, err := a.GetChannelMember(channelID, askingUserId)
|
||||
channelMember, err := a.GetChannelMember(context.Background(), channelID, askingUserId)
|
||||
if err == nil {
|
||||
roles := channelMember.GetRoles()
|
||||
if a.RolesGrantPermission(roles, permission.Id) {
|
||||
|
||||
Ссылка в новой задаче
Block a user