 				FlowRouter.go('room', { _id: result.rid })
 
 	'click button.load-more': (e) ->
-		console.log 'room click button.load-more' if window.rocketDebug
 		RoomHistoryManager.getMore @_id
 
 	'autocompleteselect #user-add-search': (event, template, doc) ->
-		console.log 'room autocompleteselect #user-add-search' if window.rocketDebug
 		roomData = Session.get('roomData' + Session.get('openedRoom'))
 
 		if roomData.t is 'd'

							i.msRequestFullscreen()

	'click .toggle-favorite': (event) ->
		console.log 'room click .toggle-favorite' if window.rocketDebug
		event.stopPropagation()
		event.preventDefault()
		Meteor.call 'toogleFavorite', @_id, !$('i', event.currentTarget).hasClass('favorite-room')

	'click .join': (event) ->
		console.log 'room click .join' if window.rocketDebug
		event.stopPropagation()
		event.preventDefault()
		Meteor.call 'joinRoom', @_id

	"click .burger": ->
		console.log 'room click .burger' if window.rocketDebug
		chatContainer = $("#rocket-chat")
		if chatContainer.hasClass("menu-closed")
			chatContainer.removeClass("menu-closed").addClass("menu-opened")

			return "(#{this.phoneNumber.substr(0,2)}) #{this.phoneNumber.substr(2,4)}-#{this.phoneNumber.substr(6)}"

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

	userActiveByUsername: (username) ->
		status = Session.get 'user_' + username + '_status'
		if status in ['online', 'away', 'busy']
			return {username: username, status: status}
		return

	roomUsers: ->
		room = ChatRoom.findOne(this._id, { reactive: false })
		ret =
			_id: this._id
