Auto join and account data concurrent update
Closed this issue · 0 comments
Every time a login is done, there are auto-joins and set account_data operations being done by the client. This can be triggered for one or more friends depending on the state persisted. If more than a friend is affected for a single account, it would incur in a concurrent update error.
The problem seems to be coming from the fact that the state of the account_data for a single room is persisted before actually joining the room, so it confuses the server when the invite is accepted to a room since it's already stored as joined.
A possible solution for this would be to:
1- Fix the account_data when an invite to a room is active, by removing the room from the joined ones in it (the validation should be offline since this data comes from the initial sync)
2- Accept the active invite to the room
3- Update once again the account_data to add the new room