MM-23876: Fix for patching channel moderations with a null team schem… (#14239)

* MM-23876: Fix for patching channel moderations with a null team scheme channel guest role.

* MM-23876: Tests the moderations response.
Этот коммит содержится в:
Martin Kraft
2020-04-07 08:05:03 -04:00
коммит произвёл GitHub
родитель 27a0ff4d52
Коммит f92d3fa518
3 изменённых файлов: 101 добавлений и 11 удалений

Просмотреть файл

@@ -204,6 +204,10 @@ func PermissionsChangedByPatch(role *Role, patch *RolePatch) []string {
func ChannelModeratedPermissionsChangedByPatch(role *Role, patch *RolePatch) []string {
var result []string
if role == nil {
return result
}
if patch.Permissions == nil {
return result
}