Add streaming API updates for announcements being modified or deleted (#12963)
Change `all_day` to be a visual client-side cue only Publish immediately if `scheduled_at` is in the past Add `published_at` and `updated_at` to announcements JSON
This commit is contained in:
parent
408b3e2b93
commit
b9d74d4076
12 changed files with 100 additions and 41 deletions
|
@ -11,6 +11,10 @@ class FeedManager
|
|||
# Must be <= MAX_ITEMS or the tracking sets will grow forever
|
||||
REBLOG_FALLOFF = 40
|
||||
|
||||
def with_active_accounts(&block)
|
||||
Account.joins(:user).where('users.current_sign_in_at > ?', User::ACTIVE_DURATION.ago).find_each(&block)
|
||||
end
|
||||
|
||||
def key(type, id, subtype = nil)
|
||||
return "feed:#{type}:#{id}" unless subtype
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue