check message size on the server

-----------------
[Geogit] // sent from France, Saint-Cloud [48.8333,2.1833] :FR:
pull/422/head
Philip Nuzhnyy 11 years ago
parent d8efa54667
commit 9011c0feae
  1. 2
      server/methods/sendMessage.coffee

@ -1,5 +1,7 @@
Meteor.methods
sendMessage: (message) ->
if message.msg?.length > RocketChat.settings.get('Message_MaxAllowedSize')
throw new Meteor.Error 400, '[methods] sendMessage -> Message size exceed Message_MaxAllowedSize'
if not Meteor.userId()
throw new Meteor.Error('invalid-user', "[methods] sendMessage -> Invalid user")

Loading…
Cancel
Save