From d7f07ae80f33cc0ed4369fd2fa79430af482a890 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?KMY=EF=BC=88=E9=9B=AA=E3=81=82=E3=81=99=E3=81=8B=EF=BC=89?= Date: Tue, 7 Nov 2023 17:16:10 +0900 Subject: [PATCH] =?UTF-8?q?Fix:=20#241=20=E3=83=AA=E3=82=B9=E3=83=88?= =?UTF-8?q?=E6=96=B0=E7=9D=80=E9=80=9A=E7=9F=A5=E3=81=A7=E3=80=81=E6=95=B0?= =?UTF-8?q?=E6=97=A5=E5=89=8D=E3=81=AE=E5=8F=A4=E3=81=84=E6=8A=95=E7=A8=BF?= =?UTF-8?q?=E3=81=AB=E3=81=A4=E3=81=84=E3=81=A6=E3=81=AE=E9=80=9A=E7=9F=A5?= =?UTF-8?q?=E3=81=8C=E6=9D=A5=E3=82=8B=E5=A0=B4=E5=90=88=E3=81=8C=E3=81=82?= =?UTF-8?q?=E3=82=8B=20(#242)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fix: #241 リスト通知の重複についてとりあえずの対処 * Fix: 本家の通知バグ --- app/javascript/mastodon/actions/notifications.js | 4 ++-- .../features/notifications/components/notification.jsx | 2 +- app/workers/feed_insert_worker.rb | 7 ++++--- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/app/javascript/mastodon/actions/notifications.js b/app/javascript/mastodon/actions/notifications.js index d72b2a3dd4..677fa1115f 100644 --- a/app/javascript/mastodon/actions/notifications.js +++ b/app/javascript/mastodon/actions/notifications.js @@ -107,8 +107,8 @@ export function updateNotifications(notification, intlMessages, intlLocale) { dispatch(importFetchedAccount(notification.report.target_account)); } - - dispatch(notificationsUpdate(notification, preferPendingItems, playSound && !filtered)); + + dispatch(notificationsUpdate({ notification }, preferPendingItems, playSound && !filtered)); fetchRelatedRelationships(dispatch, [notification]); } else if (playSound && !filtered) { diff --git a/app/javascript/mastodon/features/notifications/components/notification.jsx b/app/javascript/mastodon/features/notifications/components/notification.jsx index d0d869e91a..df4b11457b 100644 --- a/app/javascript/mastodon/features/notifications/components/notification.jsx +++ b/app/javascript/mastodon/features/notifications/components/notification.jsx @@ -368,7 +368,7 @@ class Notification extends ImmutablePureComponent { return ( -
+
diff --git a/app/workers/feed_insert_worker.rb b/app/workers/feed_insert_worker.rb index c0a1722c10..add90b23d9 100644 --- a/app/workers/feed_insert_worker.rb +++ b/app/workers/feed_insert_worker.rb @@ -10,6 +10,7 @@ class FeedInsertWorker @status = Status.find(status_id) @options = options.symbolize_keys @antenna = Antenna.find(@options[:antenna_id]) if @options[:antenna_id].present? + @pushed = false case @type when :home, :tags @@ -60,7 +61,7 @@ class FeedInsertWorker end def notify_for_list? - return false unless @type == :list + return false if @type != :list || update? || !@pushed @list.notify? end @@ -69,9 +70,9 @@ class FeedInsertWorker if @antenna.nil? || @antenna.insert_feeds case @type when :home, :tags - FeedManager.instance.push_to_home(@follower, @status, update: update?) + @pushed = FeedManager.instance.push_to_home(@follower, @status, update: update?) when :list - FeedManager.instance.push_to_list(@list, @status, update: update?) + @pushed = FeedManager.instance.push_to_list(@list, @status, update: update?) end end