]> cat aescling's git repositories - mastodon.git/commitdiff
Fix follow request count to dynamically update (#16652)
authormatildepark <matilde.park@pm.me>
Wed, 25 Aug 2021 15:46:29 +0000 (11:46 -0400)
committersingle-right-quote <34298117+single-right-quote@users.noreply.github.com>
Wed, 1 Sep 2021 00:27:18 +0000 (00:27 +0000)
app/javascript/mastodon/actions/notifications.js

index 3464ac995979d3a3395ad65421e490f4c11fd146..663cf21e3414d6d1e9619373fc20b3e8edffcb1b 100644 (file)
@@ -1,6 +1,6 @@
 import api, { getLinks } from '../api';
 import IntlMessageFormat from 'intl-messageformat';
-import { fetchRelationships } from './accounts';
+import { fetchFollowRequests, fetchRelationships } from './accounts';
 import {
   importFetchedAccount,
   importFetchedAccounts,
@@ -78,6 +78,10 @@ export function updateNotifications(notification, intlMessages, intlLocale) {
       filtered = regex && regex.test(searchIndex);
     }
 
+    if (['follow_request'].includes(notification.type)) {
+      dispatch(fetchFollowRequests());
+    }
+
     dispatch(submitMarkers());
 
     if (showInColumn) {