mirror of
https://github.com/zulip/zulip.git
synced 2025-11-15 03:11:54 +00:00
There was a bug in apply_event code where only a stream which is not private is added to the "never_subscribed" data after a stream creation event. Instead, it should be added to the "never_subscribed" data irrespective of permission policy of the stream as we already send stream creation events only to those users who can access the stream. Due to the current bug, private streams were not being added to "never_subscribed" data in apply_event for admins as well. This commit fixes it and also makes sure the "never_subscribed" list is sorted which was not done before and was also a bug. The bugs mentioned above were unnoticed as the tests did not cover these cases and this commit also adds tests for those cases.
83 KiB
83 KiB