Hey guys, I just build a social app where users can post videos, share image and text, users can like, share and comment on post, but I want a situation to show the numbers of view on a post.
Please how do I achieve this?
Everytime the post comes in to view, check if the currenr user has already "seen" it. If not, add a new item. Incrementing count on every seen would inflate the view count exponentially due to duplicity.
Maybe add an array attribute in the same post document, or create a relation with a collection or a complete separate collection for the same.
An array based attribute could get harder to manage though if the size grows substantially.
Recommended threads
- Hi Appwrite Support Team,My project has ...
Details: Project ID: 69a69f6f00113ed0e8e4 Region: SFO (sfo.cloud.appwrite.io) Error Response: Affected: ALL endpoints — Functions, Databases, Storage, Health, ...
- Sudden CORS Errors - Domain hasn't Chang...
I have an Appwrite project with two web apps configured, the first one has the hostname `*` and the second one I just added to test if it could fix the issue wi...
- Any way to temporarily bypass the email ...
Hey guys, any way to bypass the email verification to use the accounts again? i need to recover some projects that due to recent changes have been stopped, and ...