 		Tracker.nonreactive ->
 			btns = buttons.get()
 			if btns[id]
-				btns[id] = _.extend btns[id], config 
+				btns[id] = _.extend btns[id], config
 				buttons.set btns
 
 	getButtons = (message) ->
 		allButtons = _.toArray buttons.get()
 		if message
-			allowedButtons = _.compact _.map allButtons, (button) -> 
+			allowedButtons = _.compact _.map allButtons, (button) ->
 				if not button.validation? or button.validation(message)
 					return button
 		else
 			allowedButtons = allButtons
-		
+
 		return _.sortBy allowedButtons, 'order'
 
 	resetButtons = ->

					timer: 1000
					showConfirmButton: false

				instance.chatMessages.deleteMsg(message)
		validation: (message) ->
			return RocketChat.authz.hasAtLeastOnePermission('delete-message', message.rid ) or RocketChat.settings.get('Message_AllowDeleting') and message.u?._id is Meteor.userId()
		order: 2
RocketChat.MessageAction = new class
	buttons = new ReactiveVar {}

	###
	config expects the following keys (only id is mandatory):
		id (mandatory)
