Răsfoiți Sursa

Add a comment for clarity.

Shane Kilkelly 11 ani în urmă
părinte
comite
0ad374556d
1 a modificat fișierele cu 2 adăugiri și 0 ștergeri
  1. 2 0
      services/track-changes/app/coffee/UpdatesManager.coffee

+ 2 - 0
services/track-changes/app/coffee/UpdatesManager.coffee

@@ -188,6 +188,8 @@ module.exports = UpdatesManager =
 		for update in updates
 		for update in updates
 			earliestUpdate = summarizedUpdates[summarizedUpdates.length - 1]
 			earliestUpdate = summarizedUpdates[summarizedUpdates.length - 1]
 			if earliestUpdate and earliestUpdate.meta.start_ts - update.meta.end_ts < @TIME_BETWEEN_DISTINCT_UPDATES
 			if earliestUpdate and earliestUpdate.meta.start_ts - update.meta.end_ts < @TIME_BETWEEN_DISTINCT_UPDATES
+				# check if the user in this update is already present in the earliest update,
+				# if not, add them to the users list of the earliest update
 				userExists = false
 				userExists = false
 				for user in earliestUpdate.meta.users
 				for user in earliestUpdate.meta.users
 					if (!user and !update.meta.user) or (user.id == update.meta.user?.id)
 					if (!user and !update.meta.user) or (user.id == update.meta.user?.id)