 		# ctrl (command) + shift + k -> clear room messages
 		else if k is 75 and ((navigator?.platform?.indexOf('Mac') isnt -1 and event.metaKey and event.shiftKey) or (navigator?.platform?.indexOf('Mac') is -1 and event.ctrlKey and event.shiftKey))
 			RoomHistoryManager.clear rid
+	
+	isMessageTooLong: (input) ->
+		input?.value.length > this.messageMaxSize
	init: (node) ->
		this.editing = {}

		this.wrapper = $(node).find(".wrapper")
		this.input = $(node).find(".input-message").get(0)
		this.bindEvents()

			this.editing.saved = this.input.value

	send: (rid, input) ->
		if _.trim(input.value) isnt '' and not this.isMessageTooLong(input)
			console.error 'sending', input.value
			KonchatNotification.removeRoomNotification(rid)
			msg = input.value
			input.value = ''
