DEV: Allow preloading post custom fields (PR #14749)

…in PostStreamSerializerMixin.

There is one potential negative short-term side effect. Because of how PreloadedProxy works, if one of the installed plugins uses the preload functionality and another one isn’t updated yet to do the same - it raises an error (see: has_custom_fields.rb:173)

GitHub

I apologise if anything is unclear as I’m on my mobile but I believe this serializer is only used by TopicView and TopicView already has a way for plugins to preload custom fields.

This mixin is also used in TopicViewPostsSerializer/TopicsController#posts. I guess I’ll close this PR and open a new one that extracts the existing code and allows its use in both places. Thanks for the tip!