   ## above, so we don't need to check this in the client.  But this function
   ## is still needed in the server for messages.diff subscription above,
   ## and when simulating non-superuser mode in client/message.coffee.
-  message = Messages.findOne message unless message._id?
+  message = findMessage message
   return false unless message?
   group = message.group #message2group message
   if canSuper group, client, user #groupRoleCheck group, 'super', user

@descendantMessageIds = (message) ->
  descendants = []
  recurse = (m) ->
    m = Messages.findOne m if _.isString m
    for child in m.children
      descendants.push child
      recurse child


@findMessageRoot = (message) ->
  return message unless message?
  message = findMessage message
  if message.root?
    Messages.findOne message.root
  else
    message

@messageEmpty = (message) ->
  message = findMessage message
  message.title.trim().length == 0 and
  message.body.trim().length == 0 and
  not message.file
