Donate. I desperately need donations to survive due to my health

Get paid by answering surveys Click here

Click here to donate

Remote/Work from Home jobs

Can cancelled turn-based matches be stored in server storage for every match participant?

I have a two-player turn-based match that I want cancelable by any of the participants in it, no matter the active match's current turn status. I also have a list of match history where all of the user's previously played matches are supposed to be presented, including cancelled matches.

The participants of a match can currently cancel a match interactively which is done by using cancelMatch(String matchId). However, the cancelled match doesn't get stored on the server for the participant who cancelled it. When the participants displays their match history which is done by calling loadMatchesByStatus(int[] matchTurnStatuses), then the match is only returned to participants who did not cancel the match. I'd like to keep the cancelled match in both of the participants match history.

Is it possible to store cancelled matches in server storage for all participants? If so, how do I get them stored or loadMatchesByStatus() to return them?

As of right now, I will store match history somewhere else to be able to present it as explained.

Comments