fix: remove session activity updated event as it is not needed #141
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Why is this change needed?: https://www.loom.com/share/d6b407d072d54d9b86b20f4830889d79
Problem:
Activity
. But this has a drawback. The changes to an activity are applied one at a time. For example, when we fill a form, then a sub-activity is added to theActivity
document. Which triggersActivityUpdated
event.Activity
has been updated with some new data. Client updates the cache with the newActivity
data.ActivityCompleted
event is triggered asActivity
is marked as 'Done'.But what happens if
ActivityUpdated
event happens AFTERActivityCompleted
? Then the activity is first marked asDone
by theActivityCompleted
event and then the activity is markedActive
by theActivityUpdated
event. This leaves the Hosted Pages app in a wrong state.Solution:
ActivityUpdated
event from the app as it is not required. We only need to listen to statuses of Activities, not their other properties.