Just wanted to ask about the best-practice for keeping track of changes of a document. E.g. a document is a blog post and users can "like" it. Currently I am saving the userIds in an array to keep track, who is liking it. But now I want to create an Activity-View to tell other users "user xy liked the post xy". My plan was to create a function which is triggered when the blog post document is changed, and create the right Activity-documents for the other users on the server-side. But I can't check what is changed, since it could be anything.
So now I am stuck between a few options:
- change the like-array into something more complex (e.g. array with id;timestamp;isNew-Bool)
- add a flag-attribute (e.g. an last-update-type = "newLike")
- Create the Activites when the user is pressing the like-button (which I dont want, since its more load on the client-side)
- separate collection for likes (same argument as above, additional load on client-side)
- ...
But I hope there is a more simpler approach which I am missing right know. Thank you.
Recommended threads
- TOO_MANY_REDIRECTS after temporarily ena...
I am losing my mind over this, I enabled this setting because I was having issues with sites not making links with https. I enabled it, ran into issues, so I di...
- Unable to create Sites or Functions with...
Heya, I was looking at the appwrite documentation for Sites API with the server api: https://appwrite.io/docs/references/cloud/server-nodejs/sites I can’t fin...
- listRows result parsing issue
I'm using Appwrite Dart SDK "24.2.0". When I perform a listRows call in dart, I have this reponse in JSON: in " Future<models.RowList> listRows()" { "total" :...