Mark Felder
5a5a193877
Fix broken Rich Media parsing when the image URL is a relative path
2024-05-07 19:54:56 -04:00
Mark Felder
d21aa1a77c
Respect the TTL returned in OpenGraph tags
2024-05-07 19:54:56 -04:00
Mark Felder
df0734fcbf
Increase the :max_body for Rich Media to 5MB
...
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-07 19:54:56 -04:00
Mark Felder
ede414094f
RichMedia refactor
...
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-07 19:54:56 -04:00
feld
750fb25f48
Revert "Merge branch 'pleroma-card-image-description' into 'develop'"
...
This reverts merge request !4101
2024-05-07 23:20:38 +00:00
Mark Felder
06c26bf9c9
Add the absent max_featured_tags to the api spec for /api/v1/instance
2024-05-07 17:46:05 -04:00
Mark Felder
b979389958
Add configuration[accounts][max_pinned_statuses] to /api/v2/instance
...
Also add the absent max_featured_tags to the api spec for /api/v2/instance
2024-05-07 17:45:02 -04:00
Mark Felder
3cad57bf48
Add configuration[statuses][characters_reserved_per_url] to /api/v2/instance
...
Fixes #3250
2024-05-07 17:25:30 -04:00
Mark Felder
dd03184811
Strip actor from objects before federating
2024-05-07 11:54:45 -04:00
marcin mikołajczak
3893311bd2
Merge remote-tracking branch 'origin/develop' into translate-posts
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-04-27 13:48:10 +02:00
marcin mikołajczak
b53abd9d79
changelog
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-04-26 17:58:28 +02:00
marcin mikołajczak
f954f98fb7
Implement /api/v1/instance/translation_languages
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-04-25 23:57:01 +02:00
marcin mikołajczak
010c23e729
Include unspecified variants in target languages list for DeepL
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-04-25 23:55:41 +02:00
marcin mikołajczak
7fca35f4fd
InstanceView: Move supported languages to pleroma.metadata
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-04-25 23:55:24 +02:00
marcin mikołajczak
4696487f1f
Fix instance view
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-04-25 23:54:12 +02:00
marcin mikołajczak
28f8bb00d8
Add supported languages list to /api/v2/instance
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-04-25 23:54:01 +02:00
marcin mikołajczak
fedae008c8
Deepl: use :base_url
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-04-25 23:47:40 +02:00
marcin mikołajczak
2b739faa7e
Rename
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-04-25 23:45:33 +02:00
marcin mikołajczak
066ec8fe95
Update description.exs
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-04-25 23:44:50 +02:00
marcin mikołajczak
aa429f6e6a
Do not translate non-public statuses
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-04-25 23:44:34 +02:00
marcin mikołajczak
90f590788c
Add tests
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-04-25 23:44:18 +02:00
marcin mikołajczak
90f91168f7
Expose translation service availability
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-04-25 23:43:37 +02:00
marcin mikołajczak
557a7d736a
WIP Translation backends support
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-04-25 23:42:57 +02:00
Alex Gleason
df0d84833d
mix format
2024-04-25 23:17:03 +02:00
Alex Gleason
91f42781d3
ActivityDraft: detect language from content_html so it can strip links
2024-04-25 23:17:02 +02:00
Alex Gleason
8bec926beb
LanguageDetector: strip non-language text to (hopefully) improve accuracy
2024-04-25 23:15:55 +02:00
marcin mikołajczak
17d885fed8
Fix fasttext for multiline posts
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-04-25 23:12:32 +02:00
marcin mikołajczak
80dbbd5501
Detect language for incoming posts
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-04-25 23:11:12 +02:00
marcin mikołajczak
9932aeffc5
Add test
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-04-25 21:22:45 +02:00
Haelwenn
88412daf11
Apply @lanodan's suggestion
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-04-25 12:34:12 +02:00
marcin mikołajczak
32994bb9c3
Language detection
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-04-25 12:33:40 +02:00
lain
50af909c01
Merge branch 'pleroma-card-image-description' into 'develop'
...
Include image description in status media cards
See merge request pleroma/pleroma!4101
2024-04-19 07:39:05 +00:00
marcin mikołajczak
6f6bede900
Include image description in status media cards
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-04-19 10:20:31 +04:00
lain
87b8ac3ce6
Merge branch 'receiverworker-error-handling' into 'develop'
...
ReceiverWorker: Make sure non-{:ok, _} is returned as {:error, …}
See merge request pleroma/pleroma!4100
2024-04-19 06:04:44 +00:00
Haelwenn
71a0373232
Merge branch 'ffmpeg-limiter' into 'develop'
...
Prevent Media Helper from respawning ffmpeg for bad media
See merge request pleroma/pleroma!4086
2024-04-17 05:47:54 +00:00
Haelwenn (lanodan) Monnier
a299ddb10e
ReceiverWorker: Make sure non-{:ok, _} is returned as {:error, …}
...
Otherwise an error like `{:signature, {:error, {:error, :not_found}}}` ends up considered a success.
2024-04-17 07:43:47 +02:00
marcin mikołajczak
4f5c4d79c4
FEP-2c59, add "webfinger" to user actor
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-04-11 17:50:11 +02:00
marcin mikołajczak
ccc3ac241f
Add hint to rules
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-04-06 11:45:19 +02:00
marcin mikołajczak
9e6cf45906
/api/v1/accounts/familiar_followers
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-04-06 11:43:56 +02:00
marcin mikołajczak
01a5f839c5
Merge remote-tracking branch 'origin/develop' into instance_rules
2024-04-06 10:42:23 +02:00
lain
987f44d811
Merge branch 'bookmark-folders' into 'develop'
...
Fix BookmarkFolderView, add test
See merge request pleroma/pleroma!4096
2024-03-20 13:26:47 +00:00
marcin mikołajczak
37ec645ff2
Fix BookmarkFolderView, add test
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-03-20 13:24:43 +01:00
Mark Felder
40823462e7
Logger metadata for request path and authenticated user
2024-03-19 12:15:10 -04:00
Mark Felder
7dfd148ff8
Logger metadata for inbound federation requests
2024-03-19 12:15:10 -04:00
Mark Felder
741f22bfe0
MediaHelper: cache failed URLs for 15 minutes to prevent excessive retries
2024-03-19 12:14:03 -04:00
Mark Felder
c25fda34e7
Skip generating notifications for internal users
2024-03-19 12:11:30 -04:00
Mark Felder
291d531e4c
Unify notification push and streaming events for both local and federated activities
...
This also removes generation of notifications for blocked/filtered/muted users and threads.
2024-03-19 12:11:30 -04:00
Lain Soykaf
4e8a1b40cb
Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into transient-validators-defaults
2024-03-19 16:26:02 +04:00
Mark Felder
1413d2e517
Remove vestiges of old Postgres support
2024-03-18 15:42:15 -04:00
marcin mikołajczak
60c4cb21ea
InstanceView: Update features
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-03-18 14:02:29 +01:00