Merge remote-tracking branch 'parent/main' into upstream-20240308

This commit is contained in:
KMY 2024-03-12 09:27:01 +09:00
commit 8e94ed2cec
204 changed files with 5112 additions and 1998 deletions

View file

@ -178,7 +178,7 @@ module Account::Interactions
end
def unblock_domain!(other_domain)
block = domain_blocks.find_by(domain: other_domain)
block = domain_blocks.find_by(domain: normalized_domain(other_domain))
block&.destroy
end
@ -329,4 +329,8 @@ module Account::Interactions
domain_blocking_by_domain: Account.domain_blocking_map_by_domain(domains, id),
})
end
def normalized_domain(domain)
TagManager.instance.normalize_domain(domain)
end
end

View file

@ -48,6 +48,6 @@ class NotificationRequest < ApplicationRecord
private
def prepare_notifications_count
self.notifications_count = Notification.where(account: account, from_account: from_account).limit(MAX_MEANINGFUL_COUNT).count
self.notifications_count = Notification.where(account: account, from_account: from_account, filtered: true).limit(MAX_MEANINGFUL_COUNT).count
end
end

View file

@ -10,6 +10,7 @@
# text :text default(""), not null
# created_at :datetime not null
# updated_at :datetime not null
# hint :text default(""), not null
#
class Rule < ApplicationRecord
include Discard::Model