 	type: 'method'
 	name: 'sendMessage'
 	userId: (userId) ->
-		return 'bot' not in RocketChat.models.Users.findOneById(userId)?.roles
+		user = RocketChat.models.Users.findOneById(userId)
+		return true if not user?.roles
+		return 'bot' not in user.roles
 , 5, 1000


		if message.msg?.length > RocketChat.settings.get('Message_MaxAllowedSize')
			throw new Meteor.Error('error-message-size-exceeded', 'Message size exceeds Message_MaxAllowedSize', { method: 'sendMessage' })

		if not Meteor.userId()
			throw new Meteor.Error('error-invalid-user', "Invalid user", { method: 'sendMessage' })

		user = RocketChat.models.Users.findOneById Meteor.userId(), fields: username: 1, name: 1


	sendMessage: (message) ->

		check message, Object

		if not Meteor.userId()
			throw new Meteor.Error('error-invalid-user', "Invalid user", { method: 'sendMessage' })

		if message.ts
			tsDiff = Math.abs(moment(message.ts).diff())
