From 8f03b7a2fb4b420eb46942157160816185e81751 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Fri, 11 Feb 2022 22:20:19 +0100 Subject: Add notifications when a reblogged status has been updated (#17404) * Add notifications when a reblogged status has been updated * Change wording to say "edit" instead of "update" and add missing controls * Replace previous update notifications with the most up-to-date one --- app/models/notification.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'app/models/notification.rb') diff --git a/app/models/notification.rb b/app/models/notification.rb index 3bf9dd483..c14eb8a7e 100644 --- a/app/models/notification.rb +++ b/app/models/notification.rb @@ -35,6 +35,7 @@ class Notification < ApplicationRecord follow_request favourite poll + update ).freeze TARGET_STATUS_INCLUDES_BY_TYPE = { @@ -43,6 +44,7 @@ class Notification < ApplicationRecord mention: [mention: :status], favourite: [favourite: :status], poll: [poll: :status], + update: :status, }.freeze belongs_to :account, optional: true @@ -76,7 +78,7 @@ class Notification < ApplicationRecord def target_status case type - when :status + when :status, :update status when :reblog status&.reblog @@ -110,7 +112,7 @@ class Notification < ApplicationRecord cached_status = cached_statuses_by_id[notification.target_status.id] case notification.type - when :status + when :status, :update notification.status = cached_status when :reblog notification.status.reblog = cached_status -- cgit