Merge remote-tracking branch 'parent/main' into kb_development

This commit is contained in:
KMY 2024-04-27 08:42:37 +09:00
commit ec7b51504b
42 changed files with 498 additions and 227 deletions

View file

@ -219,13 +219,13 @@ class Notification < ApplicationRecord
return unless new_record?
case activity_type
when 'Status', 'Follow', 'Favourite', 'EmojiReaction', 'EmojiReact', 'FollowRequest', 'Poll', 'Report', 'AccountWarning'
when 'Status', 'Follow', 'Favourite', 'EmojiReaction', 'EmojiReact', 'FollowRequest', 'Poll', 'Report'
self.from_account_id = activity&.account_id
when 'Mention', 'StatusReference', 'ListStatus'
self.from_account_id = activity&.status&.account_id
when 'Account'
self.from_account_id = activity&.id
when 'AccountRelationshipSeveranceEvent'
when 'AccountRelationshipSeveranceEvent', 'AccountWarning'
# These do not really have an originating account, but this is mandatory
# in the data model, and the recipient's account will by definition
# always exist