Skip to content

Commit f040420

Browse files
committed
one-off task for beta update notifs
1 parent bd36196 commit f040420

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

lib/tasks/one_off.rake

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,4 +173,22 @@ namespace :one_off do
173173
)
174174
end
175175
end
176+
177+
desc "Holiday 2025 notification with Discord invite"
178+
task holiday_2025_notification: :environment do
179+
reference_code = 'holiday-2025-beta'
180+
181+
User.find_each do |user|
182+
next if user.notifications.where(reference_code: reference_code).any?
183+
184+
user.notifications.create!(
185+
message_html: '<div>Happy new year!</div><div class="blue-text text-darken-3">Big things are coming to Notebook.ai in 2026. Join our Discord for early tester access.</div>',
186+
icon: 'celebration',
187+
icon_color: 'orange',
188+
happened_at: DateTime.current,
189+
passthrough_link: 'https://discord.gg/8PD23GrBWc',
190+
reference_code: reference_code
191+
)
192+
end
193+
end
176194
end

0 commit comments

Comments
 (0)