Added self-destructing/expiring statuses
• Added: - self-destructing/expiring statuses for GabPRO members only - ExpiringStatusWorker - stopwatch icon - expires_at redux values - expires_at button in composer - expires at selection popover • Updated: - Schedule status button to not show if expiring status active
This commit is contained in:
14
app/workers/expiring_status_worker.rb
Normal file
14
app/workers/expiring_status_worker.rb
Normal file
@@ -0,0 +1,14 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class ExpiringStatusWorker
|
||||
include Sidekiq::Worker
|
||||
|
||||
sidekiq_options unique: :until_executed
|
||||
|
||||
def perform(status_id)
|
||||
status = Status.find(status_id)
|
||||
RemovalWorker.perform_async(status.id)
|
||||
rescue ActiveRecord::RecordNotFound
|
||||
true
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user