mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 06:53:25 +00:00
This was discussed in the review of #29999: https://github.com/zulip/zulip/pull/29999#discussion_r1620818568 The previous way of handling wasn't entirely correct, as unnecessary events were omitted, with a bad guarantee of even being in the correct order. This is an improvement as now the function detects that it ended up doing nothing and can skip sending an event. The race condition is hard to make up in an automated test, but we can hackily simulate it by injecting a side_effect which will create a conflicting UserPresence row when the function requests a cursor. Aside of that, the actual race was simulated in manual testing to verify the expected behavior.
44 KiB
44 KiB