Skip to content

Commit

Permalink
Only nag on messages older than 24h
Browse files Browse the repository at this point in the history
  • Loading branch information
WillNilges committed Dec 10, 2023
1 parent ef61ec9 commit ffdc1d8
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions reminder.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package main

import (
"fmt"
"time"

"github.com/slack-go/slack"
)
Expand All @@ -21,16 +22,13 @@ func (app *CSPSlack) SendReminders() error {
status := GetPinnedMessageStatus(message.Reactions)

// Don't bother if the message hasn't been up longer than a day
// XXX: I feel like this is an unnecessary distinction
/*
t, err := time.Parse("2006-01-02 15:04:05 MST", ts)
if err == nil {
if time.Since(t) < 24 * time.Hour {
fmt.Println("Message not pinned for long enough. Ignoring.")
continue
}
t, err := time.Parse("2006-01-02 15:04:05 MST", ts)
if err == nil {
if time.Since(t) < 24 * time.Hour {
fmt.Println("Message not pinned for long enough. Ignoring.")
continue
}
*/
}

// Optionally send individual reminders.
// XXX: This seems like it would be too noisy.
Expand Down

0 comments on commit ffdc1d8

Please sign in to comment.