How to deal with web-socket events and API events for same user
I have implemented real-time updates, so I have created board-wise topics (a board is a Kanban entity where a group of users collaboratively handle their tasks). When users select a particular board, they are subscribed to that topic. When any event happens on that board, I simply publish the event on that topic, so everyone gets real-time updates.
Here, my problem arises: event creators receive two events, one from the API response and the other from the WebSocket event, because the creator is also subscribed to that board's topic, thus receiving updates from other users.
What is the best approach to handle such events?