discourse/app
David Taylor bf6f8299a7 FEATURE: Pull hotlinked images immediately after posting
Previously, with the default `editing_grace_period`, hotlinked images were pulled 5 minutes after a post is created. This delay was added to reduce the chance of automated edits clashing with user edits.

This commit refactors things so that we can pull hotlinked images immediately. URLs are immediately updated in the post's `cooked` HTML. The post's raw markdown is updated later, after the `editing_grace_period`.

This involves a number of behind-the-scenes changes including:

- Schedule Jobs::PullHotlinkedImages immediately after Jobs::ProcessPost. Move scheduling to after the `update_column` call to avoid race conditions

- Move raw changes into a separate job, which is delayed until after the ninja-edit window

- Move disable_if_low_on_disk_space logic into the `pull_hotlinked_images` job

- Move raw-parsing/replacing logic into `InlineUpload` so it can be easily be shared between `UpdateHotlinkedRaw` and `PullUserProfileHotlinkedImages`
2022-05-23 14:28:02 +01:00
..
assets DEV: Add bookmark-icon component (#16893) 2022-05-23 15:01:44 +10:00
controllers FIX: Applying default user options didn't work for boolean flags (#16890) 2022-05-23 15:20:51 +02:00
helpers DEV: allow running plugin tests for server_plugin_outlet (#16883) 2022-05-20 17:14:55 +05:30
jobs FEATURE: Pull hotlinked images immediately after posting 2022-05-23 14:28:02 +01:00
mailers FIX: Use our header value instead of custom header on duplicates (#16711) 2022-05-11 13:47:12 +10:00
models DEV: Map already-downloaded hotlinked images in post_process_cooked 2022-05-23 14:28:02 +01:00
serializers FEATURE: Promote polymorphic bookmarks to default and migrate (#16729) 2022-05-23 10:07:15 +10:00
services FEATURE: Pull hotlinked images immediately after posting 2022-05-23 14:28:02 +01:00
views FEATURE: Promote polymorphic bookmarks to default and migrate (#16729) 2022-05-23 10:07:15 +10:00