mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-01 13:54:35 +03:00
5235d67fed
refs https://github.com/TryGhost/Team/issues/1709 - New event type `comment_event` (comments and replies of a member in the activity feed) - Includes member, post and parent relation by default - Added new output mapper for ActivityFeed events **Changes to `Comment` model:** * **Only limit comment fetched to root comments when not authenticated as a user:** `enforcedFilters` is applied to all queries, which is a problem because for the activity feed we also need to fetch comments which have a parent_id that is not null (`Member x replied to a comment`). The current filter in the model is specifically for the members API, not the admin API (so checking the user should fix that, not sure if that is a good pattern but couldn’t find a better alternative). * **Only set default relations for comments when withRelated is empty or not set:** `defaultRelations`: Right now, for every fetch it would force all these relations. But we don’t need all those relations for the activity feed; So I updated the pattern to only set the default relations when it is empty (which we also do on a couple of other places and seems like a good pattern). I also updated the comments-ui frontend to not send ?include |
||
---|---|---|
.. | ||
__snapshots__ | ||
actions.test.js | ||
config.test.js | ||
custom-theme-settings.test.js | ||
db.test.js | ||
email-previews.test.js | ||
emails.test.js | ||
explore.test.js | ||
files.test.js | ||
images.test.js | ||
integrations.test.js | ||
invites.test.js | ||
key-authentication.test.js | ||
labels.test.js | ||
media.test.js | ||
members-exporter.test.js | ||
members-importer.test.js | ||
members-newsletters.test.js | ||
members-stripe-connect.test.js | ||
members.test.js | ||
newsletters.test.js | ||
notifications.test.js | ||
oembed.test.js | ||
offers.test.js | ||
pages.test.js | ||
posts.test.js | ||
redirects.test.js | ||
roles.test.js | ||
session.test.js | ||
settings-files.test.js | ||
settings.test.js | ||
site.test.js | ||
slugs.test.js | ||
snippets.test.js | ||
stats.test.js | ||
tags.test.js | ||
themes.test.js | ||
tiers.test.js | ||
users.test.js | ||
utils.js | ||
webhooks.test.js |