mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-07 03:59:09 +08:00
13 lines
311 B
Ruby
13 lines
311 B
Ruby
# frozen_string_literal: true
|
|
|
|
module Jobs
|
|
class UnsilenceUsers < ::Jobs::Scheduled
|
|
every 15.minutes
|
|
|
|
def execute(args)
|
|
User
|
|
.where("silenced_till IS NOT NULL AND silenced_till < now()")
|
|
.find_each { |user| UserSilencer.unsilence(user, Discourse.system_user) }
|
|
end
|
|
end
|
|
end
|