Commit graph

16059 commits

Author SHA1 Message Date
Lain Soykaf
cc1321ea2e Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into qdrant-search-2 2024-05-19 11:51:33 +04:00
lain
401aca2548 Merge branch 'mark-read' into 'develop'
PleromaAPI: Simplify marking notifications as read

See merge request pleroma/pleroma!4111
2024-05-19 07:48:32 +00:00
Mark Felder
d07d49227f PleromaAPI: marking notifications as read no longer returns notifications 2024-05-18 18:17:35 +00:00
Lain Soykaf
3345ddd2d4 Linting 2024-05-18 15:02:22 +04:00
Lain Soykaf
7923ede8ba Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into qdrant-search-2 2024-05-18 14:45:26 +04:00
Lain Soykaf
39525bcec7 Add qdrant changelog 2024-05-18 14:07:47 +04:00
Lain Soykaf
e3933a067f QdrantSearch: Implement post deletion 2024-05-18 14:04:32 +04:00
Lain Soykaf
933117785f QdrantSearch: Add basic test 2024-05-18 13:43:47 +04:00
Lain Soykaf
61e9027131 Add docker compose file for fastembed server 2024-05-18 12:19:42 +04:00
Lain Soykaf
769773a500 Add dockerfile 2024-05-18 12:08:42 +04:00
Lain Soykaf
069ce4448c Add basic fastembed server 2024-05-18 11:55:17 +04:00
feld
99eab1fa2a Merge branch 'revert-e944b152' into 'develop'
Revert "Merge branch 'strip-object-actor' into 'develop'"

See merge request pleroma/pleroma!4112
2024-05-16 23:34:00 +00:00
feld
9988dc2227 Revert "Merge branch 'strip-object-actor' into 'develop'"
This reverts merge request !4105
2024-05-16 23:33:48 +00:00
feld
7de657ac45 Merge branch 'bad-mrf' into 'develop'
Startup detection for configured MRF modules that are missing or incorrectly defined

See merge request pleroma/pleroma!4110
2024-05-16 20:37:37 +00:00
Mark Felder
7f8a9329e5 Startup detection for configured MRF modules that are missing or incorrectly defined 2024-05-16 16:13:29 -04:00
Lain Soykaf
a9be4907c0 SearchBackend: Add drop_index 2024-05-16 10:47:24 +04:00
feld
e944b15298 Merge branch 'strip-object-actor' into 'develop'
Strip actor from objects before federating

Closes #3269

See merge request pleroma/pleroma!4105
2024-05-15 20:51:47 +00:00
Mark Felder
2965ed47bd Changelog for stripping actor from objects 2024-05-15 16:40:31 -04:00
feld
53ef576739 Merge branch 'instance_rules' into 'develop'
Instance rules

See merge request pleroma/pleroma!3669
2024-05-15 20:29:04 +00:00
feld
8da103da57 Merge branch 'fix-muted-web-push' into 'develop'
Fix processing of Web Push and streaming notifications

See merge request pleroma/pleroma!4032
2024-05-15 20:12:41 +00:00
Lain Soykaf
1261c43a7a SearchBackend: Add create_index 2024-05-14 17:19:36 +04:00
Lain Soykaf
c50f0f31f4 Docs/Search: Add basic documentation of the qdrant search 2024-05-14 16:56:58 +04:00
Lain Soykaf
1490ff30af QdrantSearch: Add query prefix. 2024-05-14 15:09:38 +04:00
Lain Soykaf
bb08a766f4 QdrantSearch: Remove debugging stuff 2024-05-14 14:26:41 +04:00
Lain Soykaf
cd7e2138d1 Search: Basic Qdrant/Ollama search 2024-05-14 14:13:37 +04:00
feld
c954437cc0 Merge branch 'mastodon-instance-v2' into 'develop'
Add new values to /api/v2/instance

Closes #3250 and #3251

See merge request pleroma/pleroma!4106
2024-05-11 12:11:00 +00:00
Mark Felder
16c72d0701 Merge branch 'develop' into fix-muted-web-push 2024-05-11 08:06:04 -04:00
feld
6cfb0d7ddb Merge branch 'restore/card-img-alt' into 'develop'
Include image description in status media cards

See merge request pleroma/pleroma!4108
2024-05-08 17:55:32 +00:00
Mark Felder
ccceb41bf3 Add test for StatusView rendering of Cards when missing descriptions 2024-05-08 13:54:57 -04:00
Mark Felder
5e7f4f687e Improve StatusView tests for Cards 2024-05-08 13:52:25 -04:00
marcin mikołajczak
818d9f7b63 Include image description in status media cards
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-05-08 13:40:26 -04:00
feld
8eea4f58c7 Merge branch 'rich-media-db' into 'develop'
RichMedia refactor

See merge request pleroma/pleroma!4057
2024-05-08 03:12:09 +00:00
Mark Felder
54c2bab25f Fix module struct matching 2024-05-07 22:27:18 -04:00
Mark Felder
9a83301ff8 Credo 2024-05-07 22:11:19 -04:00
Mark Felder
37c35daba6 Credo 2024-05-07 22:10:49 -04:00
Mark Felder
9b9a32bf74 Fix compile warning
warning: "else" clauses will never match because all patterns in "with" will always match
  lib/pleroma/web/rich_media/parser/ttl/opengraph.ex:10
2024-05-07 21:56:27 -04:00
Mark Felder
19002fd6c1 Mastodon API: Remove deprecated GET /api/v1/statuses/:id/card endpoint
Removed back in 2019

https://github.com/mastodon/mastodon/pull/11213
2024-05-08 01:44:58 +00:00
Mark Felder
37de58823f Remove test validating missing descriptions are returned as an empty string 2024-05-08 00:49:29 +00:00
Mark Felder
5bbcf5b8b7 Improve test description 2024-05-08 00:36:16 +00:00
Mark Felder
c16c023ebf Rich Media Cards are fetched asynchonously and not guaranteed to be available on first post render 2024-05-08 00:26:32 +00:00
Mark Felder
fa66bd95dc Rich Media Cards are cached by URL not per status 2024-05-08 00:23:59 +00:00
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
f40084e019 Fix broken tests 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
b42963a52c Merge branch 'revert-50af909c' into 'develop'
Revert "Merge branch 'pleroma-card-image-description' into 'develop'"

See merge request pleroma/pleroma!4107
2024-05-07 23:21:37 +00: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
acf73f7e13 Update changelog entry 2024-05-07 17:48:40 -04: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