mirror of
https://github.com/zulip/zulip.git
synced 2025-11-11 01:16:19 +00:00
This isn't really an extraction; it's more giving a name to an anonymous function and moving it to higher module scope. We convert this to an ordinary function call, which allows us to move it out of intialize(). Since there's just one simple parameter now (linked_stream), we can avoid some error checking. We also avoid the comment that describes the function, since it now has a name. And then one minor tweak is to do the inexpensive `invite_only` higher in the function. This will be a nice speedup when you link to really large public streams. The unit tests are also a bit easier to read now--less setup and more explicit names.
38 KiB
38 KiB