Server needs to accept at least one post to allow offline capabilities
maberer opened this issue · 0 comments
Thanks for the great demo!
Nevertheless, I think there is an issue related to the offline capabilities of the app when
the server is not running while a first message is posted.
In this case, the new post is stored but the user is not.
When the "NewPostEvent " event is fired and the post should be added to the list, the user is not found because it has not been saved to the datastore. As a consequence, "user" is null in the following line:
Because "users" is empty, the result array is empty.
So the post is never added to the list.
To get the expected behavior, the server has to run/respond at least the first time
a post is made. If this is the case, the returned user is added to the local datastore.
In the case outlined above, this line never runs and posts never appear.
I do not think that this is intended behavior.
What do you think?