discourse/plugins/discourse-reactions
Sérgio Saquetim 4013d1ffb8
DEV: Improve user handling and access in post components (#34013)
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.
2025-08-06 17:00:34 -03:00
..
app
assets DEV: Improve user handling and access in post components (#34013) 2025-08-06 17:00:34 -03:00
config Update translations (#33892) 2025-07-28 18:38:22 +02:00
db
lib
spec DEV: Clean up js: true from recently bundled plugin specs (#33873) 2025-07-27 12:59:00 +02:00
test/javascripts DEV: Fix various lint issues (#33811) 2025-07-24 15:27:04 +02:00
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