         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.
+      ## If this user was involved in the last edit to this mesage,
+      ## mark it as "finished" version for the user.
+      lastDiff = findLastDiff id
+      if Meteor.user().username in (lastDiff?.updators ? [])
+        MessagesDiff.update lastDiff._id,
+          $addToSet: finished: Meteor.user().username
 
   messageImport: (group, parent, message, diffs) ->
     #check Meteor.userId(), String  ## should be done by 'canImport'

        $addToSet: editing: Meteor.user().username

  messageEditStop: (id) ->
    check Meteor.userId(), String
    if Meteor.isServer
      ## We used to do the following update in client too, to do


export messageExtraFields = [
  'editing'
  #'finished'
  'submessageCount'
  'submessageLastUpdated'
  #'children'
