Skip to content

Commit 68b38c8

Browse files
1 parent 84e92d2 commit 68b38c8

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

client/views/app/room.coffee

+3-2
Original file line numberDiff line numberDiff line change
@@ -190,9 +190,10 @@ Template.room.helpers
190190
canRecordAudio: ->
191191
return RocketChat.settings.get('Message_AudioRecorderEnabled') and (navigator.getUserMedia? or navigator.webkitGetUserMedia?)
192192

193-
roomManager: ->
193+
unreadSince: ->
194194
room = ChatRoom.findOne(this._id, { reactive: false })
195-
return RoomManager.openedRooms[room.t + room.name]
195+
if room?
196+
return RoomManager.openedRooms[room.t + room.name]?.unreadSince?.get()
196197

197198
unreadCount: ->
198199
return RoomHistoryManager.getRoom(@_id).unreadNotLoaded.get() + Template.instance().unreadCount.get()

client/views/app/room.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ <h2>
3939
{{/each}}
4040
</div>
4141
{{#if unreadCount}}
42-
{{#if roomManager.unreadSince.get}}
42+
{{#if unreadSince}}
4343
<div class="unread-bar">
4444
{{_ "S_new_messages_since_s" unreadCount formatUnreadSince}}
4545
<a>

0 commit comments

Comments
 (0)