about summary refs log tree commit diff
path: root/app/models/notification.rb
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2022-02-12 14:33:01 +0100
committerGitHub <noreply@github.com>2022-02-12 14:33:01 +0100
commitf61137b7ffb97006ab811f8a4bce017b5f07f85d (patch)
treeff70b757d86a44665d16c8021cb81f8e04f396a7 /app/models/notification.rb
parent28ec7def5869ff1a85f49a070b9575c166a432ee (diff)
parentf4db2e1832e40cbdfd81feda24fcf87c96f6dbd5 (diff)
Merge pull request #1688 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/models/notification.rb')
-rw-r--r--app/models/notification.rb6
1 files changed, 4 insertions, 2 deletions
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