Felix Ableitner
ecd8e3b11b
federate post url as image depending on mime type
2023-11-06 12:35:01 +01:00
Felix Ableitner
c2a763d6fb
get rid of cache_remote_thumbnails setting, instead automatically
...
take thumbnail from federation data if available.
2023-10-30 10:58:31 +01:00
Felix Ableitner
ed3e2e0d8c
should be media_type
2023-10-27 16:48:46 +02:00
Felix Ableitner
97697aa413
store post url content type in db
2023-10-27 16:42:43 +02:00
Felix Ableitner
5507d2d680
include url content type when sending post over apub ( fixes #2611 )
2023-10-27 16:24:47 +02:00
Felix Ableitner
c8c355dbe2
more cleanup ( fixes #2611 )
2023-10-27 16:20:44 +02:00
Felix Ableitner
bf205399e5
cleanup request.rs file
2023-10-27 12:33:03 +02:00
Felix Ableitner
9b40d74cce
Merge branch 'main' into markdown-link-rule
2023-10-26 12:48:57 +02:00
Felix Ableitner
98b5746472
add tests
2023-10-26 12:32:38 +02:00
Felix Ableitner
388eb42b99
undo post.url rewriting, move http route definition
2023-10-26 11:38:44 +02:00
Felix Ableitner
986913d250
add config option
2023-10-26 10:52:24 +02:00
Dessalines
64b00ee850
Dont allow bots to vote. Fixes #3940 ( #4100 )
...
* Dont allow bots to vote. Fixes #3940
* Removing pointless function.
2023-10-25 10:14:12 -04:00
Nutomic
568233b062
Resolve federated objects from other instances via redirect ( fixes #3129 ) ( #4073 )
...
* Resolve federated objects from other instances via redirect (fixes #3129 )
* restore domain check using library change
* add test case, update apub lib
---------
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
2023-10-25 07:14:59 -04:00
Felix Ableitner
f057abff71
Merge branch 'main' into markdown-link-rule
2023-10-25 12:57:24 +02:00
Nutomic
45bed71c36
Include prometheus in default build, remove build feature ( fixes #3558 ) ( #4071 )
...
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
2023-10-25 06:54:58 -04:00
Felix Ableitner
aa49a1b173
proxy links received over federation
2023-10-25 12:35:22 +02:00
Felix Ableitner
ef79422632
add db table to validate proxied links
2023-10-24 15:56:04 +02:00
Felix Ableitner
aaf3833d12
perform markdown image processing in api/apub receivers
2023-10-24 13:27:58 +02:00
Nutomic
ec0a707110
Avoid using proxy for pictrs requests ( fixes #3489 ) ( #4072 )
...
* Avoid using proxy for pictrs requests (fixes #3489 )
* fmt
2023-10-20 11:09:34 -04:00
Nutomic
9ef28eb53b
Remove unused static ( #4061 )
2023-10-19 11:57:39 -04:00
dullbananas
a14657d124
Refactor rate limiter and improve rate limit bucket cleanup ( #3937 )
...
* Update rate_limiter.rs
* Update mod.rs
* Update rate_limiter.rs
* Update rate_limiter.rs
* Update mod.rs
* Update scheduled_tasks.rs
* Shrink `RateLimitBucket`
* Update rate_limiter.rs
* Update mod.rs
* Update rate_limiter.rs
* Update rate_limiter.rs
* Update rate_limiter.rs
* Update rate_limiter.rs
* Update mod.rs
* Update rate_limiter.rs
* fmt
* Update rate_limiter.rs
* Update rate_limiter.rs
* Update rate_limiter.rs
* Update rate_limiter.rs
* Update rate_limiter.rs
* Update rate_limiter.rs
* Update rate_limiter.rs
* Update rate_limiter.rs
* Update rate_limiter.rs
* rerun ci
* Update rate_limiter.rs
* Undo changes to fields
* Manually undo changes to RateLimitBucket fields
* fmt
* Bucket cleanup loop in rate_limit/mod.rs
* Remove rate limit bucket cleanup from scheduled_tasks.rs
* Remove ;
* Remove UNINITIALIZED_TOKEN_AMOUNT
* Update rate_limiter.rs
* fmt
* Update rate_limiter.rs
* fmt
* Update rate_limiter.rs
* fmt
* Update rate_limiter.rs
* stuff
* MapLevel trait
* fix merge
* Prevent negative numbers in buckets
* Clean up MapLevel::check
* MapLevel::remove_full_buckets
* stuff
* Use remove_full_buckets to avoid allocations
* stuff
* remove tx
* Remove RateLimitConfig
* Rename settings_updated_channel to rate_limit_cell
* Remove global rate limit cell
* impl Default for RateLimitCell
* bucket_configs doc comment to explain EnumMap
* improve test_rate_limiter
* rename default to with_test_config
---------
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
Co-authored-by: Nutomic <me@nutomic.com>
2023-10-19 15:31:51 +02:00
Nutomic
6d27bfed08
Handle invalid ban expires values ( fixes #4045 ) ( #4046 )
...
* Handle invalid ban expires values (fixes #4045 )
* Adding a few missing expire time checks. Fixing up time conversions. (#4051 )
* Adding a few missing expire time checks. Fixing up time conversions.
* Increase settings export wait time.
* get rid of RemoveCommunity.expires
* fmt
* tests
---------
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
2023-10-17 13:25:35 -04:00
Nutomic
3a19af5215
Allow marking multiple posts as read in single api call ( fixes #3963 ) ( #4048 )
...
* Allow marking multiple posts as read in single api call (fixes #3963 )
* cleanup
* limit array length
* fix test
* review
---------
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
2023-10-17 12:35:51 -04:00
Nutomic
56322c75f0
Read community follower count from home instance ( fixes #1440 ) ( #4013 )
...
* Read community follower count from home instance (fixes #1440 )
* fmt
* prettier
* fix tests
* fmt
* rename fn
* fmt
* Run prettier
* increase timeout
* ci
---------
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
Co-authored-by: Dessalines <tyhou13@gmx.com>
2023-10-17 10:34:38 -04:00
Nutomic
332e698336
Cleanup public api ( #4047 )
...
* Convert PersonSortType to purely internal
* Remove hot rank and other db optimizations from public api
2023-10-16 19:37:28 -04:00
Nutomic
256ee61908
Ignore activities in remote communities without local followers ( #4006 )
...
* Ignore activities in remote communities without local followers (fixes #3568 )
* x
* comments
* prettier
* fix api test
* fix test
* cleanup
* fix remaining test
* clippy
* decrease delay
2023-10-16 06:03:49 -04:00
Dessalines
3be56ef2e0
Trying to fix export ci, try 1. ( #4038 )
2023-10-16 12:01:59 +02:00
Nutomic
9e099726e6
Cleanup checks for community actions ( fixes #2858 , fixes #2868 ) ( #4028 )
...
* Cleanup checks for community actions (fixes #2858 , fixes #2868 )
* allow restoring deleted community
* review changes
* remove unneeded sql
* remove joins
* change mod log check
2023-10-13 09:48:18 -04:00
Nutomic
608bb6b1b4
Convert titles for posts from Mastodon to plaintext ( fixes #3828 ) ( #4033 )
...
* Convert titles for posts from Mastodon to plaintext (fixes #3828 )
* Fix prettier.
* Trigger build
* Convert titles for posts from Mastodon to plaintext (fixes #3828 )
* Fix prettier.
* Fix sanizize.
---------
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
Co-authored-by: Dessalines <tyhou13@gmx.com>
2023-10-12 20:36:02 -04:00
Nutomic
291ff19718
Only sanitize strings when generating RSS feeds and emails ( fixes #4003 ) ( #4024 )
...
* Only sanitize strings when generating RSS feeds and emails (fixes #4003 )
* clippy
* fix test
2023-10-11 16:48:19 +02:00
Nutomic
6d7b38f4de
Implement user data import/export ( #3976 )
...
* Implement endpoints for user data import/export
* add test
* exclude avatar/banner
* increase import url count, add rate limit
* also export/import saved posts
* rate limit
* rename
* saved posts also exist
* rename routes
* fix test
* error handling
* clippy
* limit parallelism
* clippy
---------
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
2023-10-11 16:47:22 +02:00
Nutomic
50589115e0
Fix federation of admin actions ( fixes #3980 ) ( #3988 )
...
* Fix federation of admin actions (fixes #3980 )
* clippy
---------
Co-authored-by: Dessalines <tyhou13@gmx.com>
2023-09-25 21:39:18 -04:00
phiresky
5941dc2924
Merge remote-tracking branch 'origin/main' into add_federation_worker_index
2023-09-21 11:57:13 +00:00
phiresky
2c283d90ca
Revert "Revert "re-remove debug comments""
...
This reverts commit 6d519ef376
.
2023-09-21 11:45:33 +00:00
phiresky
6d519ef376
Revert "re-remove debug comments"
...
This reverts commit ae37ca0137
.
2023-09-21 11:07:36 +00:00
Nutomic
f858d8cbce
Remove explicit auth params ( #3946 )
...
* Remove explicit auth params (ref #3725 )
Only take auth via header or cookie. This requires a new version
of lemmy-js-client for api tests to pass.
* rework api_crud
* remove remaining auth params, move logic to session middleware
* fmt, fix test
* update js client
* remove auth param from api tests
* Pass auth as header
* add !
* url vars, setHeader
* cleanup
* fmt
* update
* Updating for new lemmy-js-client.
---------
Co-authored-by: Dessalines <tyhou13@gmx.com>
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
2023-09-21 06:42:28 -04:00
phiresky
ae37ca0137
re-remove debug comments
2023-09-20 15:33:09 +00:00
phiresky
3d649e1d3e
remove synchronous federation flag
2023-09-20 14:22:17 +00:00
phiresky
1a0c866b51
logging temporary
2023-09-20 13:37:18 +00:00
phiresky
a59a94492d
more debug log
2023-09-20 12:30:38 +00:00
phiresky
78a8a7b8b7
clippy
2023-09-20 11:41:34 +00:00
phiresky
2e7d2d1956
wait for post api test function, better announce activity id
2023-09-20 11:23:02 +00:00
phiresky
88931227b0
Merge remote-tracking branch 'origin/main' into add_federation_worker_index
2023-09-18 16:45:23 +00:00
phiresky
27141553b6
fix after revert
2023-09-18 14:28:49 +00:00
phiresky
08401fc85f
Revert "remove synchronous federation"
...
This reverts commit 2767ab4a6f
.
2023-09-18 14:25:35 +00:00
Apple Sheeple
b431c9bdf9
Sanitize apub post body
...
Signed-off-by: Apple Sheeple <AppleSheeple@github>
2023-09-18 16:00:29 +02:00
phiresky
544d30f0d4
Fix Posts List Performance + cursor-based pagination ( #3872 )
...
* add token-based pagination + fast subscribed post view
* add migrations
* fix failing heuristic
* revert
* output pagination token as next_page, fix off-by-one, restructure
* more cleanup
* clean
* format sql
* fix comment
* fix tests
* e
* empty
* move last page thing
* restructure a bit for readability
* rename page_cursor
* update for scaled sort
* fix
* sql format
* fix
* get rid of macros
---------
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
2023-09-18 15:44:48 +02:00
phiresky
375d9a2a3c
Persistent, performant, reliable federation queue ( #3605 )
...
* persistent activity queue
* fixes
* fixes
* make federation workers function callable from outside
* log federation instances
* dead instance detection not needed here
* taplo fmt
* split federate bin/lib
* minor fix
* better logging
* log
* create struct to hold cancellable task for readability
* use boxfuture for readability
* reset submodule
* fix
* fix lint
* swap
* remove json column, use separate array columns instead
* some review comments
* make worker a struct for readability
* minor readability
* add local filter to community follower view
* remove separate lemmy_federate entry point
* fix remaining duration
* address review comments mostly
* fix lint
* upgrade actitypub-fed to simpler interface
* fix sql format
* increase delays a bit
* fixes after merge
* remove selectable
* fix instance selectable
* add comment
* start federation based on latest id at the time
* rename federate process args
* dead instances in one query
* filter follow+report activities by local
* remove synchronous federation
remove activity sender queue
* lint
* fix federation tests by waiting for results to change
* fix fed test
* fix comment report
* wait some more
* Apply suggestions from code review
Co-authored-by: SorteKanin <sortekanin@gmail.com>
* fix most remaining tests
* wait until private messages
* fix community tests
* fix community tests
* move arg parse
* use instance_id instead of domain in federation_queue_state table
---------
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
Co-authored-by: SorteKanin <sortekanin@gmail.com>
2023-09-09 12:25:03 -04:00
Dessalines
9785b20843
Adding a scaled sort, to boost smaller communities. ( #3907 )
...
* Adding a scaled sort, to boost smaller communities.
- Previously referred to as *best* .
- Fixes #3622
* Fixing scheduled task update.
* Converting hot_rank integers to floats.
* Altering hot_rank psql function to default to zero after a week.
* Setting scaled_rank to zero, where hot_rank is zero.
* Adding image_upload table.
2023-09-06 13:43:27 -04:00
SorteKanin
4121fc4d56
Include domain in errors ( #3944 )
2023-09-06 13:29:15 -04:00