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
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
marcin mikołajczak
60c4cb21ea
InstanceView: Update features
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-03-18 14:02:29 +01:00
lain
2b71f4897f
Merge branch 'develop' into 'bookmark-folders'
...
# Conflicts:
# docs/development/API/differences_in_mastoapi_responses.md
2024-03-18 10:35:02 +00:00
lain
cf0aa1238c
Merge branch 'public-polls' into 'develop'
...
Expose nonAnonymous field from Smithereen polls
See merge request pleroma/pleroma!3962
2024-03-18 06:26:22 +00:00
marcin mikołajczak
c0c4a9ed0d
Merge remote-tracking branch 'origin/develop' into instance-contact-account
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-03-08 12:12:55 +01:00
marcin mikołajczak
d415686bb9
Allow to group bookmarks in folders
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-03-01 11:04:01 +01:00
marcin mikołajczak
acb9e46074
Add some missing fields to instanceV2
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-02-27 13:25:26 +01:00
marcin mikołajczak
c592a0e58d
Merge remote-tracking branch 'origin/develop' into HEAD
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-02-22 21:05:20 +01:00
Mark Felder
3cb2807244
Pleroma.Web.MastodonAPI.StatusView: dialyzer error
...
lib/pleroma/web/mastodon_api/views/status_view.ex:799:pattern_match_cov
The pattern
_, _
can never match, because previous clauses completely cover the type
%URI{
:authority => URI.authority(),
:fragment => nil | binary(),
:host => nil | binary(),
:path => nil | binary(),
:port => nil | char(),
:query => nil | binary(),
:scheme => nil | binary(),
:userinfo => nil | binary()
},
%URI{
:authority => URI.authority(),
:fragment => nil | binary(),
:host => nil | binary(),
:path => nil | binary(),
:port => nil | char(),
:query => nil | binary(),
:scheme => nil | binary(),
:userinfo => nil | binary()
}
.
2024-01-29 18:28:49 -05:00
Mark Felder
5b95abaeea
Credo.Check.Readability.PredicateFunctionNames
...
This check was recently improved in Credo and it does make sense for readability.
The offending functions in Pleroma have been renamed and a couple missing the ? suffix have been fixed as well.
2024-01-26 16:59:58 -05:00
Haelwenn
ab3f03a04a
Merge branch 'develop' into 'public-polls'
...
# Conflicts:
# docs/development/API/differences_in_mastoapi_responses.md
2024-01-21 12:03:29 +00:00
marcin mikołajczak
b39403a48f
Update API docs for my changes
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-01-17 17:13:21 +01:00
Alexander Tumin
32d8e0d496
Fix authentication check on account rendering when bio is defined
2024-01-04 16:57:48 +03:00
tusooa
b273025fd7
Add pleroma:group_actors to instance features
2023-12-27 12:28:11 -05:00
tusooa
7a58ddfa48
Allow local user to have group actor type
...
https://git.pleroma.social/pleroma/pleroma/-/issues/3205
2023-12-27 12:27:37 -05:00
marcin mikołajczak
9fc6676d8c
Merge remote-tracking branch 'origin/develop' into instance-contact-account
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2023-12-22 13:54:44 +01:00
Haelwenn
bd50892c25
Merge branch 'instance-v2' into 'develop'
...
Implement api/v2/instance route
See merge request pleroma/pleroma!3939
2023-12-21 21:14:46 +00:00
marcin mikołajczak
4f2fb8dc5e
Use consistent terminology
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2023-12-21 00:13:13 +01:00
lain
29d202e1df
Merge branch 'add-opengraph-rich-media-proxy' into 'develop'
...
Add media proxy to opengraph rich media cards
See merge request pleroma/pleroma!3997
2023-12-13 06:23:16 +00:00
Alexander Tumin
e7af2addd8
Add media proxy to opengraph rich media cards
2023-12-12 18:32:02 +03:00
Lain Soykaf
ef8a2134bc
AccountView: Add test, refactor
2023-12-07 11:25:18 +04:00
Haelwenn (lanodan) Monnier
8ac7cc98c1
MastoAPI AccountView: Change last_status_at to be a date
...
Changed in Mastodon 3.1.0 with: https://github.com/tootsuite/mastodon/pull/12966
2023-11-16 15:52:01 +01:00
marcin mikołajczak
9a063deacc
Count and display post quotes
2023-11-12 13:38:08 +00:00
Marcin Mikołajczak
1e9333a9aa
Merge remote-tracking branch 'origin/develop' into instance-v2
2023-11-08 20:46:57 +01:00
marcin mikołajczak
93370b870a
Expose nonAnonymous field from Smithereen polls
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2023-10-28 23:58:39 +02:00
marcin mikołajczak
6b8c5e12df
Add contact account to InstanceView
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2023-10-26 23:32:08 +02:00
tusooa
08608afca5
Fix quote_visible attribute
2023-09-13 19:20:33 -04:00
tusooa
a8b2f9205d
Expose quote_id parameter on the api
2023-09-13 19:20:32 -04:00
Alex Gleason
cf8e425883
StatusView: return quote post inside a reblog
2023-09-13 19:19:04 -04:00
Alex Gleason
74e0a4555f
StatusView: add `quote_visible` param
2023-09-13 19:19:04 -04:00
Alex Gleason
6f11f11519
StatusView: fix quote visibility
2023-09-13 19:19:04 -04:00
Alex Gleason
80ab2572a4
Return quote_url through the API, don't render quotes more than 1 level deep
2023-09-13 19:19:04 -04:00
Alex Gleason
5716f88a1d
InstanceView: add "quote_posting" feature
2023-09-13 19:19:03 -04:00
Alex Gleason
0d9c443e51
StatusView: render the whole quoted status
2023-09-13 19:19:03 -04:00
Alex Gleason
ce5eb31723
StatusView: show quoted posts through the API, probably
2023-09-13 19:19:03 -04:00
marcin mikołajczak
28ef5ebd3c
Update InstanceView.features
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2023-09-07 15:00:24 +02:00
marcin mikołajczak
79e46ce73f
InstanceView: Add common_information function
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2023-08-11 13:57:22 +02:00
marcin mikołajczak
9effa24f30
Implement api/v2/instance route
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2023-08-11 00:08:05 +02:00
tusooa
c5d946bc92
Fix emoji reactions for legacy 2-tuple formats
2023-03-26 15:12:40 -04:00
Alexander Tumin
2c2ea16b50
Allow custom emoji reactions: Add pleroma_custom_emoji_reactions feature, review changes
2023-03-12 11:39:17 +03:00
Alexander Tumin
8d3b29aaba
Allow custom emoji reactions: add test for mixed emoji react, fix credo errors
2023-03-02 11:18:16 +03:00
Alexander Tumin
4b85d1c617
Allow custom emoji reactions: Fix tests, mixed custom and unicode reactions
2023-03-02 11:18:16 +03:00
floatingghost
787e30c5fd
Allow reacting with remote emoji when they exist on the post ( #200 )
...
Co-authored-by: FloatingGhost <hannah@coffee-and-dreams.uk>
Reviewed-on: https://akkoma.dev/AkkomaGang/akkoma/pulls/200
2023-03-02 11:18:16 +03:00
tusooa
bc7ec43179
Allow customizing instance languages
2023-01-26 20:17:13 -05:00
lain
e853cfe7c3
Revert "Merge branch 'copyright-bump' into 'develop'"
...
This reverts merge request !3825
2023-01-02 20:38:50 +00:00
marcin mikołajczak
10886eeaa2
Bump copyright year
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2023-01-01 12:13:06 +01:00
Sean King
60df2d8a97
Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into fine_grained_moderation_privileges
2022-12-18 22:03:48 -07:00
Lain Soykaf
4a32b584e1
StatusView: Fix warning
2022-12-15 18:02:33 -05:00