MM-11575: change plugin nil semantics (#9212)

* change MessageWillBePosted nil return semantics

* change FileWillBeUploaded nil return semantics

* use LogDebug to verify plugin inputs vs. the confusing Delete(User|Team)
Этот коммит содержится в:
Jesse Hallam
2018-08-03 13:15:51 -04:00
коммит произвёл GitHub
родитель 1ecb98d9f5
Коммит 04749027f6
5 изменённых файлов: 477 добавлений и 176 удалений

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

@@ -45,7 +45,7 @@ func TestPluginDeadlock(t *testing.T) {
func (p *MyPlugin) MessageWillBePosted(c *plugin.Context, post *model.Post) (*model.Post, string) {
if _, from_plugin := post.Props["from_plugin"]; from_plugin {
return post, ""
return nil, ""
}
p.API.CreatePost(&model.Post{
@@ -57,7 +57,7 @@ func TestPluginDeadlock(t *testing.T) {
},
})
return post, ""
return nil, ""
}
func main() {
@@ -120,7 +120,7 @@ func TestPluginDeadlock(t *testing.T) {
func (p *MyPlugin) MessageWillBePosted(c *plugin.Context, post *model.Post) (*model.Post, string) {
if _, from_plugin := post.Props["from_plugin"]; from_plugin {
return post, ""
return nil, ""
}
p.API.CreatePost(&model.Post{
@@ -132,7 +132,7 @@ func TestPluginDeadlock(t *testing.T) {
},
})
return post, ""
return nil, ""
}
func main() {