diff --git a/CHANGELOG.md b/CHANGELOG.md index 3645da3..b5bf318 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,8 @@ # Changelog +## 0.19.6 +### Bugfixes +- Fixed reminder feature + ## 0.19.5 ### Bugfixes - Fixed hider reason disable feature diff --git a/lib/tasks/reminder.rake b/lib/tasks/reminder.rake index 1823146..592c526 100644 --- a/lib/tasks/reminder.rake +++ b/lib/tasks/reminder.rake @@ -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