]> cat aescling's git repositories - mastodon.git/commitdiff
Keep notification when muting_notifications is true (#7311)
authorabcang <abcang1015@gmail.com>
Wed, 2 May 2018 14:14:51 +0000 (23:14 +0900)
committerThibaut Girka <thib@sitedethib.com>
Tue, 26 Feb 2019 18:33:42 +0000 (19:33 +0100)
* Keep notification when muting_notifications is true

* Retrun mute object

* Fix test

app/javascript/flavours/glitch/reducers/notifications.js

index 6667966c026242dbf57be07967a0e10ceaf938d0..c44674a80d34fcac33fac38c285423be75f1f907 100644 (file)
@@ -208,7 +208,7 @@ export default function notifications(state = initialState, action) {
     return expandNormalizedNotifications(state, action.notifications, action.next);
   case ACCOUNT_BLOCK_SUCCESS:
   case ACCOUNT_MUTE_SUCCESS:
-    return filterNotifications(state, action.relationship);
+    return action.relationship.muting_notifications ? filterNotifications(state, action.relationship) : state;
   case NOTIFICATIONS_CLEAR:
     return state.set('items', ImmutableList()).set('hasMore', false);
   case TIMELINE_DELETE: