- these apps don't need to be published because they're internal and get
compiled into Admin
- therefore, we can reset their versions back to 0.0.0 and remove the
publishConfig block so we don't accidentally publish them
closes https://linear.app/tryghost/issue/AP-421
This makes loading the inbox and activity tabs _way_ faster, so we no
longer have to artificially restrict the amount of data coming in, it
also gives us proper pagination for both views.
closes https://linear.app/tryghost/issue/AP-422
We found that some images will 403 when hotlinked, showing broken images, we
can catch these errors and render the default instead.
refs
[TryGhost/ActivityPub#44](https://github.com/TryGhost/ActivityPub/pull/44)
To support pagination in the activitypub app, the following changes have
been made:
- Move filtering and sorting of activities to the server
- Refactor how comments are processed (comments are now returned as part
of the activity)
- Refactor how replies to own activities are processed in the activities
tab (removed object map)
ref https://linear.app/tryghost/issue/AP-395
This is a stopgap solution, because currently we don't have any of our own
reply data in the frontend, so this will show the new reply, but it won't be
present on page reload. Should be enough for a demo video, but I think we need
to either fetch our outbox, or make a new replies endpoint and fetch from there
ref b9d02f8051beb9120a282bcbf0f70440c2a3c39e
Because we disabled the button on blue of the textarea, it was being disabled
before the click would be handled! Using the mousedown event means that our
event gets handled before the blur.
ref https://linear.app/tryghost/issue/AP-396
We need to use a number instead of boolean here so that the state is always
refreshed, otherwise we can run into issues where we set `focused` to true but
there's no rerender because it was previously set to true, but unfocused
ref https://linear.app/tryghost/issue/AP-398
This adds an internal focus state so that we can render the reply box different
based on whether or not the textarea is focused!
ref https://linear.app/tryghost/issue/AP-396
I think it's nicer API to pass in a focused property, rather than an
element ref, but I don't have much experience here, so it might be the
wrong approach!
ref https://linear.app/tryghost/issue/AP-397
I think we're gonna want to pass this data into the component long
term, but this will do for now, I'm going to look at cleaning up these
components in my next B week
In order to show replies in our notifications, we loop through all the
replies in our inbox, and filter them by the ones replying to an account
on our domain, however the check we were doing was on the admin domain -
which is sometimes the same as the frontend domain, but not always. This
fixes the check so that we check the frontend domain, which is the one
used by activitypub.
Pulled out the logic of finding the attachment(s) into a shared
function, which will only return an array if there are multiple
attachments, otherwise either null or an object will be returned.
This fixes an issue where the code assumed that an array meant
we have multiple attachments
refs https://linear.app/tryghost/issue/AP-388
The attributedTo property of objects refers to the author of the object,
wheras the actor of an activity refers to the author of the activity -
in the case of a `Create` activity - these are generally the same, but
in the case of an `Announce` they are different, the author refers to
the "announcer" and the attributedTo the author of the content! This is
a quick patch to use the true author when it's available, and in a
format we can handle.
- Added activity icon for Replies
- Updated Replies design
- Updated hard-coded Profile values to more realistic ones
- Renamed ActivityPub nav item and moved it to the top of the navbar
- Added a check for post attachments