Unverified Commit 31caf1a0 authored by Robbe Van Herck's avatar Robbe Van Herck
Browse files

Don't send message if user leaves

parent 359ffa53
......@@ -2,7 +2,7 @@
"id": "mattermost-great-filter",
"name": "The Great Filter",
"description": "For filtering out messages",
"version": "0.1.1",
"version": "0.1.2",
"server": {
"executables": {
"linux-amd64": "server/dist/plugin-linux-amd64",
......
......@@ -5,5 +5,5 @@ var manifest = struct {
Version string
}{
Id: "mattermost-great-filter",
Version: "0.1.1",
Version: "0.1.2",
}
......@@ -74,7 +74,7 @@ func (p *Plugin) MessageWillBeUpdated(c *plugin.Context, newPost *model.Post, _
}
func (p *Plugin) UserHasLeftChannel(c *plugin.Context, channelMember *model.ChannelMember, actor *model.User) {
if actor == nil {
if actor == nil || channelMember.UserId == actor.Id {
// User removed themselves from the channel
return
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment