Files
tobi 409b286dc2 [bugfix] Fix statuses not being timelined + notified when dereffed rather than delivered (#4667)
This pull request pulls the "surfacing" logic in `processing/workers` into a separate `surfacing` package, which exposes a `surfacer` struct with functions set on it for things like notifying, timelining, emailing, and streaming.

The surfacer is then set on sub-processors, so that those sub-processors can call surfacing functions as necessary (during status creation etc).

To fix issues like https://codeberg.org/superseriousbusiness/gotosocial/issues/4627, where posts are not appearing in timelines or being notified for, because they entered the instance in ways other than being POSTed to an inbox, dereferencer functions now accept an optional  `newThreadEntryCallback` function that will be triggered for each *new* status dereferenced as part of (asynchronous) thread dereferencing.

As such, in common race conditions where we see a status by doing parent / search / thread dereferencing *BEFORE* that status actually gets POSTed to our inbox, the status should still be timelined + notified (as appropriate).

Closes https://codeberg.org/superseriousbusiness/gotosocial/issues/4627
Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4667
Co-authored-by: tobi <tobi.smethurst@protonmail.com>
Co-committed-by: tobi <tobi.smethurst@protonmail.com>
2026-02-05 16:28:08 +01:00
..