diff --git a/.discourse-compatibility b/.discourse-compatibility index fb72979..6916ecd 100644 --- a/.discourse-compatibility +++ b/.discourse-compatibility @@ -1,3 +1,4 @@ +2.9.0.beta7: 272e9dd760f82e33f9756866434ddcbe470cdb8e 2.9.0.beta2: e7c19ac107dcd37618c7ac7b98530e99c7fe31db 2.8.0.beta3: 23287ece952cb45203819e7b470ebc194c58cb13 2.7.7: 23287ece952cb45203819e7b470ebc194c58cb13 diff --git a/lib/data_explorer_query_group_bookmarkable.rb b/lib/data_explorer_query_group_bookmarkable.rb index b38d72b..40693f4 100644 --- a/lib/data_explorer_query_group_bookmarkable.rb +++ b/lib/data_explorer_query_group_bookmarkable.rb @@ -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 diff --git a/spec/lib/data_explorer_query_group_bookmarkable_spec.rb b/spec/lib/data_explorer_query_group_bookmarkable_spec.rb index 11429ab..27388c0 100644 --- a/spec/lib/data_explorer_query_group_bookmarkable_spec.rb +++ b/spec/lib/data_explorer_query_group_bookmarkable_spec.rb @@ -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