       ## speculatively, but it seems problematic for now.
       Messages.update id,
         $pull: editing: Meteor.user().username
-      unless Messages.findOne(id).editing?.length
+      unless Messages.findOne(id).editing?.length  ## removed last editor
+        Meteor.clearTimeout stopTimers[id]
         editor2messageUpdate id, [Meteor.user().username]
         ShareJS.model.delete id
-    ## xxx should add to last MessagesDiff (possibly just made) that
-    ## Meteor.user().username just committed this version.
+      ## xxx should add to last MessagesDiff (possibly just made) that
+      ## Meteor.user().username just committed this version.
 
   messageImport: (group, parent, message, diffs) ->
     #check Meteor.userId(), String  ## should be done by 'canImport'


if Meteor.isServer
  editorTimers = {}

  ## If we're using a persistent store for sharejs, we need to cleanup
  ## leftover documents from last time.  This should only be for local

  ## Need to be able to edit the child message and be able to post within
  ## the target parent.
  canEdit(child) and canPost group, parent

@message2group = (message) ->
  findMessage(message)?.group
