       #if root?.threadPrivacy? and 'public' not in root.threadPrivacy
       #  message.private = true
     now = new Date
-    username = Meteor.user().username
     message.group = group
     ## Default content.
     message.title = "" unless message.title?
     message.body = "" unless message.body?
-    message.format = Meteor.user()?.profile?.format or defaultFormat unless message.format?
+    message.format = user?.profile?.format or defaultFormat unless message.format?
     message.tags = {} unless message.tags?
-    message.published = autopublish() unless message.published?
-    message.updators = [Meteor.user().username]
+    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 = username
+    message.creator = user.username
     message.created = now
     message.authors =
-      "#{escapeUser username}": now
+      "#{escapeUser user.username}": now
     #message.parent: parent         ## use children, not parent
     message.children = []
     ## Speed up _messageParent by presetting root

  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 Meteor.isServer
  rootMessages().forEach _submessagesChanged

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, false, user
    switch privacy
      when true
        unless root.threadPrivacy? and 'private' in root.threadPrivacy
