Skip to content

Commit

Permalink
feat: add get discord message logs api
Browse files Browse the repository at this point in the history
  • Loading branch information
nnhuyhoang committed Oct 8, 2024
1 parent dc910f2 commit 0a066f5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/handler/discord/discord.go
Original file line number Diff line number Diff line change
Expand Up @@ -810,10 +810,10 @@ func (h *handler) ListChannelMessageLogs(c *gin.Context) {
startDate := input.GetStartDate()
endDate := input.GetEndDate()

// maximum 3 month messages
threeMonths := time.Hour * 24 * 90
if endDate.Sub(*startDate) > threeMonths {
newEndDate := startDate.Add(threeMonths)
// maximum 1 month messages
oneMonth := time.Hour * 24 * 30
if endDate.Sub(*startDate) > oneMonth {
newEndDate := startDate.Add(oneMonth)
endDate = &newEndDate
}

Expand Down

0 comments on commit 0a066f5

Please sign in to comment.