Merge branch 'master' into glitch-soc/merge-upstream
Conflicts: - `app/lib/feed_manager.rb`: Not a real conflict, glitch-soc-only DM-related method too close to changed upstream stuff. Ported upstream changes. - `app/services/batched_remove_status_service.rb`: Additional logic in glitch-soc to clear DMs from timelines. Ported upstream changes and fixed the DM TL clearing logic. - `app/workers/scheduler/feed_cleanup_scheduler.rb`: Additional code in glitch-soc to clear DM timelines. Ported upstream changes.
This commit is contained in:
@@ -2,29 +2,10 @@
|
||||
|
||||
module Chewy
|
||||
class Strategy
|
||||
class CustomSidekiq < Base
|
||||
class Worker
|
||||
include ::Sidekiq::Worker
|
||||
|
||||
sidekiq_options queue: 'pull'
|
||||
|
||||
def perform(type, ids, options = {})
|
||||
options[:refresh] = !Chewy.disable_refresh_async if Chewy.disable_refresh_async
|
||||
type.constantize.import!(ids, options)
|
||||
end
|
||||
class CustomSidekiq < Sidekiq
|
||||
def update(_type, _objects, _options = {})
|
||||
super if Chewy.enabled?
|
||||
end
|
||||
|
||||
def update(type, objects, _options = {})
|
||||
return unless Chewy.enabled?
|
||||
|
||||
ids = type.root.id ? Array.wrap(objects) : type.adapter.identify(objects)
|
||||
|
||||
return if ids.empty?
|
||||
|
||||
Worker.perform_async(type.name, ids)
|
||||
end
|
||||
|
||||
def leave; end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -77,7 +77,7 @@ module Mastodon
|
||||
def create(username)
|
||||
account = Account.new(username: username)
|
||||
password = SecureRandom.hex
|
||||
user = User.new(email: options[:email], password: password, agreement: true, approved: true, admin: options[:role] == 'admin', moderator: options[:role] == 'moderator', confirmed_at: options[:confirmed] ? Time.now.utc : nil)
|
||||
user = User.new(email: options[:email], password: password, agreement: true, approved: true, admin: options[:role] == 'admin', moderator: options[:role] == 'moderator', confirmed_at: options[:confirmed] ? Time.now.utc : nil, bypass_invite_request_check: true)
|
||||
|
||||
if options[:reattach]
|
||||
account = Account.find_local(username) || Account.new(username: username)
|
||||
|
||||
@@ -17,7 +17,7 @@ module Mastodon
|
||||
end
|
||||
|
||||
def flags
|
||||
'rc2'
|
||||
'rc3'
|
||||
end
|
||||
|
||||
def suffix
|
||||
|
||||
@@ -412,7 +412,7 @@ namespace :mastodon do
|
||||
|
||||
password = SecureRandom.hex(16)
|
||||
|
||||
user = User.new(admin: true, email: email, password: password, confirmed_at: Time.now.utc, account_attributes: { username: username })
|
||||
user = User.new(admin: true, email: email, password: password, confirmed_at: Time.now.utc, account_attributes: { username: username }, bypass_invite_request_check: true)
|
||||
user.save(validate: false)
|
||||
|
||||
prompt.ok "You can login with the password: #{password}"
|
||||
|
||||
Reference in New Issue
Block a user