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

This commit is contained in:
KMY 2024-04-26 09:16:08 +09:00
commit c4017eb993
22 changed files with 389 additions and 146 deletions

View file

@ -30,7 +30,7 @@ class Notification < ApplicationRecord
'EmojiReaction' => :emoji_reaction,
'StatusReference' => :status_reference,
'Poll' => :poll,
'AccountWarning' => :warning,
'AccountWarning' => :moderation_warning,
}.freeze
PROPERTIES = {
@ -70,10 +70,10 @@ class Notification < ApplicationRecord
update: {
filterable: false,
}.freeze,
warning: {
severed_relationships: {
filterable: false,
}.freeze,
severed_relationships: {
moderation_warning: {
filterable: false,
}.freeze,
'admin.sign_up': {
@ -208,15 +208,6 @@ class Notification < ApplicationRecord
end
end
def from_account_web
case activity_type
when 'AccountWarning'
account_warning&.target_account
else
from_account
end
end
after_initialize :set_from_account
before_validation :set_from_account