Closed Jeremy643 closed 5 years ago
Would it not make sense to include the ID of the person who caused the event? Because then as a unit it's a 'drawoffer' event with the ID of the person who made the offer. Otherwise it could become confusing from a readability perspective.
This shouldn't change the functionality of this either. To see if you need to display the event on the front end you can just check if your user ID doesn't match the one that generated the event.
The reason why I was thinking of including the ID of the opponent rather than the ID of the player issuing the draw offer or notification was to prevent spectators from receiving them.
I think that spectators should receive them, but perhaps not display them in the same way that the opponent would. If you're watching a game, I'd imagine you'd like to know if a player has forfeited or made an offer to draw since it reveals information about the game.
Include the ID of the opponent who will be receiving the draw offer or resignation notification in the emit.