mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-28 06:44:26 +08:00
This pull request improves how user properties are managed and accessed in post-related components and models. Notable improvements include: - The `Post` model now provides a cached `user` property, ensuring a consistent and up-to-date user object using relevant post fields, instead of relying on `user` being set directly or via the `PostStream`. - Components such as `PostAvatar` and `PostMetaDataPosterName` now consistently reference the `user` property, improving reliability and reducing the risk of missing or inconsistent user data. - User context is more accurately passed to value transformers and plugin outlets, ensuring that avatar and name rendering logic always receives the correct user information. - The `GroupPostSerializer` now includes the `user_id` attribute, improving API consistency. - Test cases have been updated to work with the new user property approach, removing direct creation of user objects on posts and instead relying on post fields. - The `discourse-reactions` plugin was updated to align with the new user property logic, ensuring reaction-related user data is accessed consistently. Overall, these changes improve data integrity, reduce the risk of rendering errors due to user data inconsistencies, and streamline how user information is passed through Discourse post-related features. |
||
|---|---|---|
| .. | ||
| app | ||
| assets | ||
| config | ||
| db | ||
| lib | ||
| spec | ||
| test/javascripts | ||
| plugin.rb | ||
| README.md | ||
Discourse Reactions
Discourse-reactions is a plugin that allows user to add their reactions to the post.
For more information, please see: https://meta.discourse.org/t/discourse-reactions-beyond-likes/183261