 		return Meteor.users.findOne({ username: String(username) }) or { username: String(username) }
 
 	showUserInfo: ->
-		webrtc = WebRTC.getInstanceByRoomId(Session.get('openedRoom'))
+		webrtc = WebRTC.getInstanceByRoomId(this.rid)
 		videoActive = webrtc?.localUrl?.get()? or webrtc?.remoteItems?.get()?.length > 0
 		return Session.get('showUserInfo') and not videoActive
 

		users = _.sortBy users, 'username'

		ret =
			_id: Session.get('openedRoom')
			total: room?.usernames?.length or 0
			totalOnline: users.length
			users: users

		return ret

	canAddUser: ->
		roomData = Session.get('roomData' + Session.get('openedRoom'))
		return '' unless roomData
		return roomData.t in ['p', 'c'] and roomData.u?._id is Meteor.userId()


		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?
