Skip to content

Changes to content rendering

Alain St-Denis requested to merge astdenis/content-rendering into master

With these changes, socialhome now provides rendered content to federation which will use it for protocols that require it. It also expects to receive rendered content from federation, when available. Raw content, i.e. Markdown, is still being provided/handled.

This started as an attempt to improve hashtag and mention links processing that were a hit and miss with some AP payloads.

The changes require federation support.

To process HTML as well as Markdown content, BeautifulSoup is now used, mainly replacing the hashtag and mention extraction and linkification (is that a word?).

In addition, the following fixes/changes are included:

  • Do not create profiles that are about to be retracted. Prevents the annoying "Error fetching profile" red box from popping up.
  • Fetch missing mention profiles for inbound payloads.
  • Re-instate support for reply shares on inbound (broken since federation started properly set the content type on replies).
  • Handle a rare race condition that has two workers trying create the same profile. Will be revisited later.
  • Do not lowercase the finger property.
  • Convert the remote_url property method into a URLField. Populate with the corresponding property for AP payloads, and derive from the GUID for Dispora payloads.
  • Trigger a remote profile update on empty remote_url property.
  • Import and adapt process_text_links from federation.
  • Replace the deprecated -e syntax with pkg @ url in requirements.
  • Fetch missing inbound mention profiles.
  • UI: render author names with v-html in order to properly handle html escapes. Will also be required when adding custom emojis support.
  • Remove escapes and markdown from page titles.
Edited by Alain St-Denis

Merge request reports