mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 09:42:07 +08:00
12 lines
277 B
Ruby
12 lines
277 B
Ruby
|
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 do |user|
|
||
|
UserSilencer.unsilence(user, Discourse.system_user)
|
||
|
end
|
||
|
end
|
||
|
end
|
||
|
end
|