Skip to content

Commit

Permalink
## 0.19.6
Browse files Browse the repository at this point in the history
### Bugfixes
- Fixed reminder feature
  • Loading branch information
mr-exz committed Jan 7, 2025
1 parent cabc757 commit 30791dd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Changelog
## 0.19.6
### Bugfixes
- Fixed reminder feature

## 0.19.5
### Bugfixes
- Fixed hider reason disable feature
Expand Down
6 changes: 3 additions & 3 deletions lib/tasks/reminder.rake
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
require_relative '../../bot/commands/main'
namespace :reminder do
task remind: :environment do
channels = Channel.where("json_extract(settings, '$.reminder_enabled') = ?", true)
channels = Channel.where("JSON_EXTRACT(settings, '$.reminder_enabled') = 'true'")

channels.each do |channel|
begin
duty = Duty.where(channel_id: channel.slack_channel_id).where(enabled: true).take!
reason = WhoIsOnDutyTodaySlackBotModule::Commands::Other.determine_reason(duty)
unless reason.nil?
p "Reason to skip reminder:#{reason}"
unless reason.nil? || reason[:type] == 'working_hours'
p "Reason to skip reminder:#{reason[:type]}"
next
end
rescue => e
Expand Down

0 comments on commit 30791dd

Please sign in to comment.