mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-05 11:23:47 +08:00
When a site is created, any staff users created in that period should not see a blue dot for the upcoming change link in the admin sidebar, we don't need to notify them of "new" upcoming changes when they have only just joined. Additionally, any new admins or moderators created later on should also not immediately see a blue dot in the upcoming change sidebar, though these changes are "new" to them, they could potentially be quite old upcoming changes.
17 lines
273 B
Ruby
17 lines
273 B
Ruby
# frozen_string_literal: true
|
|
|
|
module Migration
|
|
module Helpers
|
|
def self.site_created_at
|
|
Discourse.site_creation_date
|
|
end
|
|
|
|
def self.existing_site?
|
|
site_created_at < 1.hour.ago
|
|
end
|
|
|
|
def self.new_site?
|
|
!existing_site?
|
|
end
|
|
end
|
|
end
|