diff --git a/src/state/reducers/messages.ts b/src/state/reducers/messages.ts index 9c649b91..44ad5364 100644 --- a/src/state/reducers/messages.ts +++ b/src/state/reducers/messages.ts @@ -16,7 +16,7 @@ import * as actions from '../actions'; import * as types from '../types'; import { withToken } from './accessToken'; -import { getBuddyStatus } from '../selectors'; +import { getBuddyStatus, getIsBanned } from '../selectors'; export type State = types.AppState['messages']; export type LoopState = actions.LS; @@ -237,7 +237,10 @@ export const hasUnseen: ( buddyId: string, ) => (appState: types.AppState) => boolean = buddyId => appState => pipe(getMessagesByBuddyId(buddyId)(appState), messages => - messages.some(({ type, isSeen }) => type === 'Received' && !isSeen), + messages.some( + ({ type, isSeen }) => + type === 'Received' && !isSeen && !getIsBanned(buddyId)(appState), + ), ); export const isAnyMessageUnseen = (appState: types.AppState) =>