Skip to content

Commit

Permalink
rename
Browse files Browse the repository at this point in the history
  • Loading branch information
walnuts1018 committed Mar 31, 2024
1 parent 3d834d1 commit 2ccf84b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions slack/slack.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ func (c *Client) HandleSlackEvents(ctx context.Context) {
innerEvent := eventsAPIEvent.InnerEvent
slog.Debug("InnerEvent", "innerEvent", innerEvent)
if ev, ok := innerEvent.Data.(*slackevents.MemberJoinedChannelEvent); ok {
observTarget, err := c.DetermineGeneralChannel(ctx)
observTarget, err := c.DetermineObservTarget(ctx)
if err != nil {
slog.Error("Error determining MCG channel", "error", err)
continue
Expand Down Expand Up @@ -234,7 +234,7 @@ func (c *Client) HandleSlackEvents(ctx context.Context) {
} else if ev, ok := innerEvent.Data.(*slackevents.ChannelCreatedEvent); ok {
slog.Debug("ChannelCreatedEvent", "event", ev)

observTarget, err := c.DetermineGeneralChannel(ctx)
observTarget, err := c.DetermineObservTarget(ctx)
if err != nil {
slog.Error("Error determining MCG channel", "error", err)
continue
Expand Down Expand Up @@ -282,7 +282,7 @@ type ObservTarget struct {
generalChannelID string
}

func (c *Client) DetermineGeneralChannel(ctx context.Context) (ObservTarget, error) {
func (c *Client) DetermineObservTarget(ctx context.Context) (ObservTarget, error) {
now := synchro.Now[tz.AsiaTokyo]()

if c.determineYearCache != (ObservTarget{}) && now.Before(c.determineYearExpiresAt) {
Expand Down

0 comments on commit 2ccf84b

Please sign in to comment.