       # Don't do anything when document is removed
       return unless newDocument._id
 
+      # Don't do anything if there was no change
+      return if _.isEqual newDocument, oldDocument
+
       timestamp = moment.utc().toDate()
       relatedIds = @relatedIds newDocument, oldDocument
       relatedIds = [relatedIds] unless _.isArray relatedIds

      $set:
        updatedAt: timestamp

  constructor: (fields) ->
    super fields, (newDocument, oldDocument) ->
      # Don't do anything when document is removed
      return unless newDocument._id

      timestamp = moment.utc().toDate()
      @updateUpdatedAt newDocument._id, timestamp

      # Every time we update updatedAt, we update lastActivity as well
      @updateLastActivity newDocument._id, timestamp

@UpdatedAtTrigger = (args...) ->
  new UpdatedAtTriggerClass args...

      $set:
        lastActivity: timestamp

  constructor: (fields, trigger) ->
    super fields, trigger or (newDocument, oldDocument) ->
      # Don't do anything when document is removed
      return unless newDocument._id

      # Don't do anything if there was no change
      return if _.isEqual newDocument, oldDocument

      timestamp = moment.utc().toDate()
      @updateLastActivity newDocument._id, timestamp
