From 04749027f62a6c830bdc33b793c24c13b9fb8ba2 Mon Sep 17 00:00:00 2001 From: Jesse Hallam Date: Fri, 3 Aug 2018 13:15:51 -0400 Subject: 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) --- app/plugin_deadlock_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'app/plugin_deadlock_test.go') diff --git a/app/plugin_deadlock_test.go b/app/plugin_deadlock_test.go index 381206943..1dcaaa228 100644 --- a/app/plugin_deadlock_test.go +++ b/app/plugin_deadlock_test.go @@ -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() { -- cgit v1.2.3-1-g7c22