Merge branch 'main' into glitch-soc/merge-upstream
Conflicts: - `app/models/status.rb`: Upstream added lines close to a glitch-soc only line, not a real conflict. Applied upstream's changes (added hooks) while keeping glitch-soc's changes (`local_only` scope). - `config/environments/production.rb`: Upstream removed a header, while we have glitch-soc specific ones. Removed the header removed upstream.
This commit is contained in:
@@ -126,6 +126,8 @@ class Account < ApplicationRecord
|
||||
scope :not_excluded_by_account, ->(account) { where.not(id: account.excluded_from_timeline_account_ids) }
|
||||
scope :not_domain_blocked_by_account, ->(account) { where(arel_table[:domain].eq(nil).or(arel_table[:domain].not_in(account.excluded_from_timeline_domains))) }
|
||||
|
||||
after_update_commit :trigger_update_webhooks
|
||||
|
||||
delegate :email,
|
||||
:unconfirmed_email,
|
||||
:current_sign_in_at,
|
||||
@@ -591,4 +593,9 @@ class Account < ApplicationRecord
|
||||
|
||||
CanonicalEmailBlock.where(reference_account: self).delete_all
|
||||
end
|
||||
|
||||
# NOTE: the `account.created` webhook is triggered by the `User` model, not `Account`.
|
||||
def trigger_update_webhooks
|
||||
TriggerWebhookWorker.perform_async('account.updated', 'Account', id) if local?
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user