Skip to content
Snippets Groups Projects
Unverified Commit 2dd3545b authored by Anton Georgiev's avatar Anton Georgiev Committed by GitHub
Browse files

Merge pull request #6447 from jfsiebel/problem-with-unread-messages

Set default value for idChatOpen
parents ad8cc292 02570a8c
No related branches found
No related tags found
No related merge requests found
......@@ -5,6 +5,8 @@ import Auth from '/imports/ui/services/auth';
import LoadingScreen from '/imports/ui/components/loading-screen/component';
const STATUS_CONNECTING = 'connecting';
const CHAT_CONFIG = Meteor.settings.public.chat;
const PUBLIC_CHAT_ID = CHAT_CONFIG.public_id;
class AuthenticatedHandler extends Component {
static setError(codeError) {
......@@ -82,7 +84,7 @@ class AuthenticatedHandler extends Component {
} = this.state;
Session.set('isChatOpen', false);
Session.set('idChatOpen', '');
Session.set('idChatOpen', PUBLIC_CHAT_ID);
Session.set('isMeetingEnded', false);
Session.set('isPollOpen', false);
Session.set('breakoutRoomIsOpen', false);
......
......@@ -196,7 +196,7 @@ const updateScrollPosition =
);
const updateUnreadMessage = (timestamp) => {
const chatID = Session.get('idChatOpen');
const chatID = Session.get('idChatOpen') || PUBLIC_CHAT_ID;
const isPublic = chatID === PUBLIC_CHAT_ID;
const chatType = isPublic ? PUBLIC_GROUP_CHAT_ID : chatID;
return UnreadMessages.update(chatType, timestamp);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment