summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2024-05-07Fix broken Rich Media parsing when the image URL is a relative pathMark Felder
2024-05-07Respect the TTL returned in OpenGraph tagsMark Felder
2024-05-07Increase the :max_body for Rich Media to 5MBMark Felder
Websites are increasingly getting more bloated with tricks like inlining content (e.g., CNN.com) which puts pages at or above 5MB. This value may still be too low.
2024-05-07RichMedia refactorMark Felder
Rich Media parsing was previously handled on-demand with a 2 second HTTP request timeout and retained only in Cachex. Every time a Pleroma instance is restarted it will have to request and parse the data for each status with a URL detected. When fetching a batch of statuses they were processed in parallel to attempt to keep the maximum latency at 2 seconds, but often resulted in a timeline appearing to hang during loading due to a URL that could not be successfully reached. URLs which had images links that expire (Amazon AWS) were parsed and inserted with a TTL to ensure the image link would not break. Rich Media data is now cached in the database and fetched asynchronously. Cachex is used as a read-through cache. When the data becomes available we stream an update to the clients. If the result is returned quickly the experience is almost seamless. Activities were already processed for their Rich Media data during ingestion to warm the cache, so users should not normally encounter the asynchronous loading of the Rich Media data. Implementation notes: - The async worker is a Task with a globally unique process name to prevent duplicate processing of the same URL - The Task will attempt to fetch the data 3 times with increasing sleep time between attempts - The HTTP request obeys the default HTTP request timeout value instead of 2 seconds - URLs that cannot be successfully parsed due to an unexpected error receives a negative cache entry for 15 minutes - URLs that fail with an expected error will receive a negative cache with no TTL - Activities that have no detected URLs insert a nil value in the Cachex :scrubber_cache so we do not repeat parsing the object content with Floki every time the activity is rendered - Expiring image URLs are handled with an Oban job - There is no automatic cleanup of the Rich Media data in the database, but it is safe to delete at any time - The post draft/preview feature makes the URL processing synchronous so the rendered post preview will have an accurate rendering Overall performance of timelines and creating new posts which contain URLs is greatly improved.
2024-05-07Revert "Merge branch 'pleroma-card-image-description' into 'develop'"feld
This reverts merge request !4101
2024-04-19Merge branch 'pleroma-card-image-description' into 'develop'lain
Include image description in status media cards See merge request pleroma/pleroma!4101
2024-04-19Include image description in status media cardsmarcin mikołajczak
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-04-19Merge branch 'receiverworker-error-handling' into 'develop'lain
ReceiverWorker: Make sure non-{:ok, _} is returned as {:error, …} See merge request pleroma/pleroma!4100
2024-04-17Merge branch 'ffmpeg-limiter' into 'develop'Haelwenn
Prevent Media Helper from respawning ffmpeg for bad media See merge request pleroma/pleroma!4086
2024-04-17ReceiverWorker: Make sure non-{:ok, _} is returned as {:error, …}Haelwenn (lanodan) Monnier
Otherwise an error like `{:signature, {:error, {:error, :not_found}}}` ends up considered a success.
2024-04-11FEP-2c59, add "webfinger" to user actormarcin mikołajczak
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-03-20Merge branch 'bookmark-folders' into 'develop'lain
Fix BookmarkFolderView, add test See merge request pleroma/pleroma!4096
2024-03-20Fix BookmarkFolderView, add testmarcin mikołajczak
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-03-19MediaHelper: cache failed URLs for 15 minutes to prevent excessive retriesMark Felder
2024-03-19Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into ↵Lain Soykaf
transient-validators-defaults
2024-03-18Remove vestiges of old Postgres supportMark Felder
2024-03-18InstanceView: Update featuresmarcin mikołajczak
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-03-18Merge branch 'develop' into 'bookmark-folders'lain
# Conflicts: # docs/development/API/differences_in_mastoapi_responses.md
2024-03-18Merge branch 'public-polls' into 'develop'lain
Expose nonAnonymous field from Smithereen polls See merge request pleroma/pleroma!3962
2024-03-17Notifications: filter on users rather than activitiesMatthieu Rakotojaona
2024-03-17ActivityPub.Publisher: Don't try federating if a user doesn't have an inbox.Lain Soykaf
2024-03-17Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into ↵Lain Soykaf
pleroma-fix-3241
2024-03-17Merge branch 'force-mention' into 'develop'lain
Add ForceMention mrf See merge request pleroma/pleroma!4082
2024-03-15Merge branch 'backups' into 'develop'feld
Include following/followers in backups See merge request pleroma/pleroma!4085
2024-03-15QuestionOptionsValidator: set default AS typesHaelwenn (lanodan) Monnier
2024-03-15AttachmentValidator: Set "Link" as default typeHaelwenn (lanodan) Monnier
2024-03-10Include following/followers in backupsmarcin mikołajczak
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-03-10Merge branch 'instance-contact-account' into 'develop'tusooa
Add contact account to InstanceView See merge request pleroma/pleroma!3960
2024-03-08Merge branch 'fix-framegrabs' into 'develop'feld
Fix ffmpeg framegrabs with Exile See merge request pleroma/pleroma!4087
2024-03-08Merge remote-tracking branch 'origin/develop' into instance-contact-accountmarcin mikołajczak
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-03-07Fix ffmpeg framegrabs with ExileMark Felder
2024-03-07Merge remote-tracking branch 'origin/develop' into link-verificationmarcin mikołajczak
2024-03-07Apply tusooa's suggestiontusooa
2024-03-07Apply ledyba's suggestion(s) to 1 file(s)tusooa
2024-03-07Merge branch 'instance-v2' into 'develop'tusooa
Add some missing fields to instanceV2 See merge request pleroma/pleroma!4081
2024-03-02fmtKaede Fujisaki
2024-03-02Consider a case when inbox is nilKaede Fujisaki
2024-03-01Add ForceMention mrfmarcin mikołajczak
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-03-01Allow to group bookmarks in foldersmarcin mikołajczak
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-02-27Add some missing fields to instanceV2marcin mikołajczak
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-02-24Merge branch 'remote-fetcher-error' into 'develop'Haelwenn
RemoteFetcherWorker: Make sure {:error, _} is returned on failure See merge request pleroma/pleroma!4077
2024-02-23Rename variable to make the worker retry logic easier to readMark Felder
The boolean value matches the intent of the "last_attempt" variable name now
2024-02-23RemoteFetcherWorker: Make sure {:error, _} is returned on failureHaelwenn (lanodan) Monnier
Otherwise jobs are considered a success.
2024-02-22Merge remote-tracking branch 'origin/develop' into HEADmarcin mikołajczak
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-02-22Prevent publisher jobs from erroring if the connection pool is fullMark Felder
A full pool is a soft-error. Snooze the job for 30 seconds and try again.
2024-02-22Gun Connection Pool was not attempting to free a connection and retry once ↵Mark Felder
if the pool was full.
2024-02-20StealEmojiPolicy: Sanitize shortcodesHaelwenn (lanodan) Monnier
Closes: https://git.pleroma.social/pleroma/pleroma/-/issues/3245
2024-02-17Force more frequent full_sweep GC runs on the Websocket processesMark Felder
Websocket processes seem to be the primary culprit for Binary memory allocation bloat.
2024-02-15Merge branch 'websocket-refactor' into 'develop'feld
Websocket refactor to use Phoenix.Socket.Transport See merge request pleroma/pleroma!4064
2024-02-15Merge branch 'oauth-nickname' into 'develop'lain
Use User.full_nickname/1 in oauth html template See merge request pleroma/pleroma!4054