Prevent aggregation of changes from different users.

This commit is contained in:
Paulo Reis 2017-06-01 16:33:50 +01:00
parent b2a7686204
commit 26260fc11f

View file

@ -247,7 +247,12 @@ define [
delete delete_changes[change.id]
entries[change.id] ?= {}
if potential_aggregate and change.op.d and change.op.p == prev_insertion.op.p + prev_insertion.op.i.length
if (
potential_aggregate and
change.op.d and
change.op.p == prev_insertion.op.p + prev_insertion.op.i.length and
change.metadata.user_id == prev_insertion.metadata.user_id
)
aggregate_entry = true
new_entry = {