Universalis-FFXIV / Universalis

A crowdsourced market board API for FFXIV.
https://universalis.app/
MIT License
183 stars 27 forks source link

WebSocket API does not send expected listings data; fails to filter states #1346

Open Ennea opened 1 month ago

Ennea commented 1 month ago

The WebSocket API currently does not send the listings data in the expected format. The listings/add event appears to send the full current state, while the listings/remove event appears to send the full previous state. Expected would be to just receive the newly added or removed one, respectively.

Kara pointed out on Discord that the issue likely lies within the fragile comparison of listings in this function, and mentioned that perhaps comparing based on the listing ID makes more sense: https://github.com/Universalis-FFXIV/Universalis/blob/60d613ae427a6da07d9ad88071661265b3611d63/src/Universalis.Application/Uploads/Behaviors/MarketBoardUploadBehavior.cs#L137

karashiiro commented 1 month ago

Deployed a change to publish remove before add, will look more deeply into this when I'm back from vacation.