chat-js: check for association in unreads count

Ensure chat has association so that we don't show chats from groups that
we are no longer in.

Fixes #2818
This commit is contained in:
Liam Fitzgerald 2020-07-14 11:41:48 +10:00
parent 06c58764af
commit 7398306858

View File

@ -73,6 +73,7 @@ export default class ChatApp extends React.Component<ChatAppProps, {}> {
unreads[stat] = Boolean(unread);
if (
unread &&
stat in associations.chat &&
(selectedGroups.length === 0 ||
selectedGroups
.map((e) => {