Skip to content
This repository has been archived by the owner on Dec 6, 2023. It is now read-only.

Commit

Permalink
Closes: #127
Browse files Browse the repository at this point in the history
  • Loading branch information
scottleedavis committed Jun 28, 2019
1 parent 07d2945 commit 559384a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 17 deletions.
2 changes: 1 addition & 1 deletion plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "com.github.scottleedavis.mattermost-plugin-remind",
"name": "Remind Bot Plugin",
"name": "Remind Bot",
"description": "Sets Reminders for users and channels",
"version": "0.4.0",
"server": {
Expand Down
18 changes: 4 additions & 14 deletions server/activate.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,27 +53,17 @@ func (p *Plugin) OnActivate() error {
}
}

p.activated = true
p.URL = fmt.Sprintf("%s", *p.ServerConfig.ServiceSettings.SiteURL)
if err := p.TranslationsPreInit(); err != nil {
return errors.Wrap(err, "failed to initialize translations")
}
p.Run()

return nil
}

func (p *Plugin) OnDeactivate() error {

p.Stop()
p.activated = false

return nil
}

func (p *Plugin) OnConfigurationChange() error {
if p.activated {
p.URL = fmt.Sprintf("%s", *p.ServerConfig.ServiceSettings.SiteURL)
if err := p.TranslationsPreInit(); err != nil {
return errors.Wrap(err, "failed to initialize translations")
}
}
return nil
}

Expand Down
2 changes: 0 additions & 2 deletions server/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ type Plugin struct {

remindUserId string

activated bool

running bool

emptyTime time.Time
Expand Down

0 comments on commit 559384a

Please sign in to comment.