 		users = _.sortBy users, 'username'
 
 		ret =
-			_id: Session.get('openedRoom')
-			total: room?.usernames?.length or 0
+			_id: this.rid
+			total: ChatRoom.findOne(this.rid)?.usernames?.length or 0
 			totalOnline: users.length
 			users: users
 
 		return ret
 
 	canAddUser: ->
-		roomData = Session.get('roomData' + Session.get('openedRoom'))
+		roomData = Session.get('roomData' + this._id)
 		return '' unless roomData
 		return roomData.t in ['p', 'c'] and roomData.u?._id is Meteor.userId()
 

		return Meteor.users.findOne({ username: String(username) }) or { username: String(username) }

	showUserInfo: ->
		webrtc = WebRTC.getInstanceByRoomId(Session.get('openedRoom'))
		videoActive = webrtc?.localUrl?.get()? or webrtc?.remoteItems?.get()?.length > 0
		return Session.get('showUserInfo') and not videoActive


		return t('Add_users')

	isGroupChat: ->
		return ChatRoom.findOne(this.rid, { reactive: false })?.t in ['c', 'p']

	isDirectChat: ->
		return ChatRoom.findOne(this.rid, { reactive: false })?.t is 'd'

	roomUsers: ->
		users = []
		onlineUsers = RoomManager.onlineUsers.get()

		for username in ChatRoom.findOne(this.rid)?.usernames or []
			if onlineUsers[username]?
				utcOffset = onlineUsers[username]?.utcOffset
				if utcOffset?
