diff --git a/client/routes/router.coffee b/client/routes/router.coffee index 7befa9eadbe..43334ed209b 100644 --- a/client/routes/router.coffee +++ b/client/routes/router.coffee @@ -21,6 +21,7 @@ Router.onBeforeAction -> this.layout('loginLayout') this.render('loginForm') else + Session.set 'openedRoom', null this.next() Router.onBeforeAction -> @@ -74,8 +75,9 @@ Router.route '/room/:_id', if not ChatRoom.find(@params._id).count() Router.go 'home' - Session.set('openedRoom', this.params._id) - Session.set('showUserInfo', null) + Session.set 'openedRoom', @params._id + Meteor.call 'readMessages', @params._id + KonchatNotification.removeRoomNotification @params._id this.next()