mirror of
https://github.com/discourse/discourse.git
synced 2024-12-25 12:23:51 +08:00
0a5f548635
As part of this move, we are also renaming `discourse-chat` to `chat`.
16 lines
335 B
Ruby
16 lines
335 B
Ruby
# frozen_string_literal: true
|
|
|
|
module Jobs
|
|
class AutoJoinUsers < ::Jobs::Scheduled
|
|
every 1.hour
|
|
|
|
def execute(_args)
|
|
ChatChannel
|
|
.where(auto_join_users: true)
|
|
.each do |channel|
|
|
Chat::ChatChannelMembershipManager.new(channel).enforce_automatic_channel_memberships
|
|
end
|
|
end
|
|
end
|
|
end
|