DEV: Bookmarkable reminder refinement (#183)

Incorporates changes from core
 0ca1152c1c
This commit is contained in:
Martin Brennan 2022-07-18 13:40:24 +10:00 committed by GitHub
parent 272e9dd760
commit a48b7d1ab5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 6 deletions

View File

@ -1,3 +1,4 @@
2.9.0.beta7: 272e9dd760f82e33f9756866434ddcbe470cdb8e
2.9.0.beta2: e7c19ac107dcd37618c7ac7b98530e99c7fe31db
2.8.0.beta3: 23287ece952cb45203819e7b470ebc194c58cb13
2.7.7: 23287ece952cb45203819e7b470ebc194c58cb13

View File

@ -34,14 +34,12 @@ class DataExplorerQueryGroupBookmarkable < BaseBookmarkable
end
def self.reminder_handler(bookmark)
bookmark.user.notifications.create!(
notification_type: Notification.types[:bookmark_reminder],
send_reminder_notification(
bookmark,
data: {
title: bookmark.bookmarkable.query.name,
display_username: bookmark.user.username,
bookmark_name: bookmark.name,
bookmarkable_url: "/g/#{bookmark.bookmarkable.group.name}/reports/#{bookmark.bookmarkable.query.id}"
}.to_json
}
)
end

View File

@ -112,9 +112,10 @@ describe DataExplorerQueryGroupBookmarkable do
expect(notif.data).to eq(
{
title: bookmark1.bookmarkable.query.name,
bookmarkable_url: "/g/#{bookmark1.bookmarkable.group.name}/reports/#{bookmark1.bookmarkable.query.id}",
display_username: bookmark1.user.username,
bookmark_name: bookmark1.name,
bookmarkable_url: "/g/#{bookmark1.bookmarkable.group.name}/reports/#{bookmark1.bookmarkable.query.id}"
bookmark_id: bookmark1.id
}.to_json
)
end