question

autreras avatar image
autreras asked

Limit users to perform action on an item at most once

We have a review system that allow users to upvote/downvote for certain items. We are also using the reporting system. And we are adding some other custom actions for UGC.

  • How to make sure these actions can be made at most once per user per item?

We thought about using PlayerData, so each user "remembers" internally which item was reported or voted. So, when performing an action, a query to PlayerData is made to make sure that action over certain item was not made before.

  • Would this work almost instantaneously? We have read and realized that some changes take time to be reflected on the PlayFab system.

We also thought about making queries on the event system. But it seems there is no API to make programmatic queries for the event system.

Any other recommendation is accepted.

Thanks in advance =)

Player DataapisIn-Game EconomyContentcommunity
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Simon Cui avatar image
Simon Cui answered

How to make sure these actions can be made at most once per user per item?

You can use Player Internal Data (Or other types of data) to store the state of “upvote/downvote” for items. For security reasons, I suggest you using Azure Function to implement this feature for avoiding being hacked in client side.

Would this work almost instantaneously? We have read and realized that some changes take time to be reflected on the PlayFab system.

There may be some delays which is inevitable. You can also prevent player calling this API too frequently in client side.

2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

autreras avatar image autreras commented ·

Thanks Simon! One last question:

Is a DisplayProperty update faster than a rating update?

We need almost real-time updates.

Thank you!

0 Likes 0 ·
Simon Cui avatar image Simon Cui autreras commented ·

I noticed you had another question Recommendations for Rating System - Playfab Community. As the answer said, DisplayProperties is not suitable for the upvote/downvote system you want. As of the delay of rating update, please refer to Adding ratings to your content - PlayFab | Microsoft Learn.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.