mirror of
https://github.com/discourse/discourse.git
synced 2025-05-23 23:31:18 +08:00
FEATURE: Send notifications to admins when new features are released (#19460)
This commit adds a new notification that gets sent to admins when the site gets new features after an upgrade/deploy. Clicking on the notification takes the admin to the admin dashboard at `/admin` where they can see the new features under the "New Features" section. Internal topic: t/87166.
This commit is contained in:
@ -24,8 +24,14 @@ class Admin::DashboardController < Admin::StaffController
|
||||
end
|
||||
|
||||
def new_features
|
||||
new_features = DiscourseUpdates.new_features
|
||||
|
||||
if current_user.admin? && most_recent = new_features&.first
|
||||
DiscourseUpdates.bump_last_viewed_feature_date(current_user.id, most_recent["created_at"])
|
||||
end
|
||||
|
||||
data = {
|
||||
new_features: DiscourseUpdates.new_features,
|
||||
new_features: new_features,
|
||||
has_unseen_features: DiscourseUpdates.has_unseen_features?(current_user.id),
|
||||
release_notes_link: AdminDashboardGeneralData.fetch_cached_stats["release_notes_link"]
|
||||
}
|
||||
|
Reference in New Issue
Block a user