About vote

Hello , when I show post poll on my Feed how can know if I already maked vote to this poll or not

Hello, when you cast your vote in the poll as a current user, it should automatically indicate that you have voted. Could you please clarify what you would like to achieve so we can find the best suitable solution for this?

I have a post that have a poll and when I see this post I make vote on the poll .
I need if I see this post again to know if I already voted this or not ?
I don’t need this after try to vote again No , I asked if is there any way to know if I already voted this or not , something like isVotedByUser = true

@hossam What type of SDK are you currently implementing?

I used the API service

1 Like

@hossam Regarding your question about knowing if you’ve already voted in a poll, we suggest that you check the following link: Amity API. You should look for the isVoted attribute to see if it returns true, indicating that you have already cast your vote in that poll.

isVoted will return based on every user or for user that who already create this poll and vote on that ?

@hossam For every user who queries the post or poll.

Thank you for your response

1 Like

Hello Thank you for the helpful answer but I need to know every user what it he vote he voted and the answer

Hello, for this particular use case, we would suggest utilizing our webhook to store events in your database and filter them from there.

Webhook endpoint: Amity API
Webhook docs: Webhook Events - Amity Docs