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

Commit

Permalink
bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
scottleedavis committed May 23, 2019
1 parent b90600d commit 9dc491b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ ifneq ($(HAS_SERVER),)
cd server && env GOOS=linux GOARCH=amd64 $(GO) build -o dist/plugin-linux-amd64;
cd server && env GOOS=darwin GOARCH=amd64 $(GO) build -o dist/plugin-darwin-amd64;
cd server && env GOOS=windows GOARCH=amd64 $(GO) build -o dist/plugin-windows-amd64.exe;
cd server && cp -a i18n dist/i18n
endif

## Ensures NPM dependencies are installed without having to run this all the time.
Expand Down
4 changes: 4 additions & 0 deletions server/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@
"id": "list.element.past",
"translation": "\"{{.Message}}\""
},
{
"id": "list.element.past.snoozed",
"translation": "\"{{.Message}}\" (snoozed until {{.Snoozed}})"
},
{
"id": "list.element.channel",
"translation": "\"{{.Message}}\" (in {{.Channel}}) {{.Occurrence}}"
Expand Down
4 changes: 1 addition & 3 deletions server/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,18 +153,16 @@ func (p *Plugin) categorizeOccurrences(reminders []Reminder) (
} else if !strings.HasPrefix(reminder.Target, "~") &&
reminder.Completed == p.emptyTime &&
t.Before(time.Now().UTC()) &&
s == p.emptyTime {
(s == p.emptyTime || s.Before(time.Now().UTC())) {
pastOccurrences = append(pastOccurrences, occurrence)
} else if strings.HasPrefix(reminder.Target, "~") &&
reminder.Completed == p.emptyTime &&
t.After(time.Now().UTC()) {
channelOccurrences = append(channelOccurrences, occurrence)
} else if reminder.Completed != p.emptyTime {
p.API.LogInfo("completed reminder: " + fmt.Sprintf("%v", reminder))
p.API.LogInfo("completed occurrence: " + fmt.Sprintf("%v", occurrence))
} else {
p.API.LogInfo("unknown reminder: " + fmt.Sprintf("%v", reminder))
p.API.LogInfo("unknown occurrence: " + fmt.Sprintf("%v", occurrence))
}

}
Expand Down

0 comments on commit 9dc491b

Please sign in to comment.