 if Meteor.isServer
   rootMessages().forEach _submessagesChanged
 
-checkPrivacy = (privacy, root) ->
+checkPrivacy = (privacy, root, user = Meteor.user()) ->
   return unless privacy?
   root = findMessageRoot root  ## can pass message or message ID
   return unless root?
-  unless canSuper root.group
+  unless canSuper root.group, false, user
     switch privacy
       when true
         unless root.threadPrivacy? and 'private' in root.threadPrivacy

  else
    false

@canPost = (group, parent) ->
  ## parent actually ignored
  Meteor.userId()? and
  groupRoleCheck group, 'post'

@canEdit = (msg) ->
  ## Can edit message if an "author" (the creator or edited in the past),

      #if root?.threadPrivacy? and 'public' not in root.threadPrivacy
      #  message.private = true
    now = new Date
    message.group = group
    ## Default content.
    message.title = "" unless message.title?
    message.body = "" unless message.body?
    message.format = user?.profile?.format or defaultFormat unless message.format?
    message.tags = {} unless message.tags?
    message.published = autopublish user unless message.published?
    message.updators = [user.username]
    message.updated = now
    if message.published == true
      message.published = now
    message.deleted = false unless message.deleted?
    ## Content specific to Messages, not MessagesDiff
    diff = _.clone message
    message.creator = user.username
    message.created = now
    message.authors =
      "#{escapeUser user.username}": now
    #message.parent: parent         ## use children, not parent
    message.children = []
    ## Speed up _messageParent by presetting root
