You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
pixelfed/app/Jobs/StatusPipeline
Anil Kulkarni dbd2e17728
Ensure the cloud url is used when publishing a status to activitypub
Posting is done in two steps - first the media is uploaded and that begins a processing pipeline. When the media is finally
processed, the media pipeline sets the cdn_url to the final image (in the cloud if configured).
At any time, the user can click post. This begins a separate NewStatusPipeline to deliver the status over ActivityPub.
This causes a race. If the NewStatusPipeline runs before the media finishes processing, then the status is delivered with
the un-processed (and un-optimized images). If pixelfed is set to use cloud storage, then the ActivityPub message also incorrectly
uses the local media.

This commit fixes the race condition by waiting for all the media to be processed before sending the message over ActivityPub.
A new publish_delayed column is set per-post, indicating whether the
status should be delayed until all media is processed.

Then, the NewStatusPipeline is called twice per post -
When the media finishes processing and when the status is posted.

Both times, the pipeline will check to see if it's valid to post
If so, the pipeline will try to set publish_delayed to false
and only if it is the first time doing so, will it publish the post
1 month ago
..
NewStatusPipeline.php Ensure the cloud url is used when publishing a status to activitypub 1 month ago
RemoteStatusDelete.php Update RemoteStatusDelete, fix decrement logic 4 months ago
StatusActivityPubDeliver.php Fix curl 9 months ago
StatusDelete.php Update activitpub setting, use config_cache() 2 years ago
StatusEntityLexer.php Update Status caption logic, stop storing duplicate html caption in db and defer to cached StatusService rendering 1 year ago
StatusLocalUpdateActivityPubDeliverPipeline.php Fix curl 9 months ago
StatusRemoteUpdatePipeline.php Update Status storage, add SanitizerService to fix spacing in html stripped content 2 months ago
StatusReplyPipeline.php Update notification pipelines, fix non-local saving 2 years ago
StatusTagsPipeline.php Update StatusTagsPipeline, fix hashtag bug and formatting 11 months ago