Commit Graph

4527 Commits

Author SHA1 Message Date
SleeplessOne1917
c471692949
Merge branch 'main' into comment-fix 2023-09-18 19:31:46 -04:00
SleeplessOne1917
be961075c7 Do not filter removed and deleted comments on the backend 2023-09-18 19:31:12 -04:00
Dessalines
c25734e4ca
Merge branch 'main' into add_federation_worker_index 2023-09-18 19:19:24 -04:00
Dessalines
8c419103b2 Fixing formatting. 2023-09-18 19:19:13 -04:00
Dessalines
4f85adc393
Merge branch 'main' into add_federation_worker_index 2023-09-18 19:16:49 -04:00
SleeplessOne1917
f93d08a147 Make moderators be able to see removed comments in communities they moderate 2023-09-18 19:09:17 -04:00
phiresky
990445bf84 tmp tail lemmy log 2023-09-18 21:08:17 +00:00
phiresky
a19b1d2606 ci 2023-09-18 21:02:52 +00:00
phiresky
afde8e7576 tweak more tests 2023-09-18 20:31:12 +00:00
phiresky
dff54d5e39 tweak tests more 2023-09-18 19:58:20 +00:00
Apple Sheeple
c05458adcd Sanitize registration application answer
Signed-off-by: Apple Sheeple <AppleSheeple@github>
2023-09-18 22:39:29 +03:00
Apple Sheeple
5fff7504e5 Reject registration application if sanitizing the username modifies it
This removes the possibility of using a mix of sanitized and
 non-sanitized values for `username` in code.

Signed-off-by: Apple Sheeple <AppleSheeple@github>
2023-09-18 22:39:20 +03:00
phiresky
7dd857e00b log result 2023-09-18 19:19:40 +00:00
phiresky
2f0ad53b60 wait longer for fed init 2023-09-18 18:39:09 +00:00
phiresky
9868065089 minor test improvement 2023-09-18 18:23:55 +00:00
phiresky
d58e2e9db7 minor test improvement 2023-09-18 18:09:18 +00:00
phiresky
007f4f5319 wait on score 2023-09-18 17:30:02 +00:00
phiresky
954b3f443d fix wait 2023-09-18 17:28:23 +00:00
phiresky
9e886fba4a delay shorter 2023-09-18 16:49:55 +00:00
phiresky
88931227b0 Merge remote-tracking branch 'origin/main' into add_federation_worker_index 2023-09-18 16:45:23 +00:00
phiresky
943b960c32 fix waits after all follow actions 2023-09-18 16:29:08 +00:00
phiresky
48496599b2 ci 2023-09-18 15:45:39 +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
SleeplessOne1917
7118200cab Use up to date default UI container for dev 2023-09-18 07:55:38 -04:00
SleeplessOne1917
6d02a9914c Update translation 2023-09-18 07:38:00 -04:00
SleeplessOne1917
05b1ebdc7c Fix comments created by ser not showing up 2023-09-18 02:59:59 -04:00
SleeplessOne1917
eab1862e9a Make deleted and removed comments show when they have childern 2023-09-17 23:38:07 -04:00
phiresky
fc1f9c1ec3 ci 2023-09-15 22:06:55 +00:00
phiresky
c86173577d fix export location 2023-09-15 15:51:31 +00:00
phiresky
7ee707e78b ci 2023-09-13 11:59:09 +00:00
phiresky
b09ffa7197 instead of changing fed delays in debug mode, change them via env variable 2023-09-13 11:23:13 +00:00
phiresky
dca43dcfd9 fix a bug where after an hour community follows would be overwritten completely by an incremental upgrade 2023-09-13 10:54:10 +00:00
Dessalines
4f1240487e Fixing high CPU usage on federation worker recheck. Fixes #3958 2023-09-12 15:54:49 -04:00
Alex Roman
6735a98d35
Async scheduler (#3949)
* fix: switch to async scheduler

* fix: pass context to scheduled tasks

* Merge remote-tracking branch 'upstream/main' into async-scheduler

* retrigger ci

* retrigger ci
2023-09-11 11:12:16 +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
Nutomic
3b67642ec2
Add ts(skip) attributes to fix js client code generation (#3952)
* Add ts(skip) attributes to fix js client code generation

* use feature flag
2023-09-08 08:35:58 -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
SorteKanin
722027ce2e
Bump ts_rs version (#3947)
Co-authored-by: Nutomic <me@nutomic.com>
2023-09-06 13:04:24 -04:00
Nutomic
71d61138bc
Replace ammonia lib with manual html escaping (fixes #3774) (#3938)
* Replace ammonia lib with manual html escaping (fixes #3774)

* prettier

* clippy

* remove sanitize unit test

* fix tests

* fix schema
2023-09-06 10:56:26 -04:00
Anon
fe3ebea95a
Add logging for pictrs uploads (#3927)
* Add logging for pictrs uploads

* cleanup
2023-09-06 09:13:30 -04:00
Dessalines
797d26fdf4
Change AddAdmin to use person_id instead of local_user_id (#3941)
- Front ends don't have easy access to local_user_id on moddable
  items like comments and posts.
2023-09-06 11:37:03 +02:00
Nutomic
a0ea8dbc00
Auto resolve reports trigger (#3871)
* Revert "Automatically resolve report when post/comment is removed (#3850)"

This reverts commit f7f6766650.

* Automatically resolve reports using db trigger

* lint

* use mod log tables

* fix migration

* fix ci

* fix clippy
2023-09-05 05:35:10 -04:00
Nutomic
366d9d1e2e
Get rid of remaining Perform/SendActivity traits (fixes #3670) (#3926)
* Get rid of remaining Perform/SendActivity traits (fixes #3670)

* fix api tests

* ci
2023-09-05 05:33:46 -04:00
dullbananas
a1a9c3e4c0
Make use of variables less redundant and inconsistent in distinguish.rs (#3932)
* Make use of variables less redundant and inconsistent in distinguish.rs

* fmt
2023-09-04 11:06:54 +02:00
dullbananas
5b5ac0f37d
Remove left joins and use only one call to select method in post_view.rs (#3865)
* Use same joins for read and list in post_view.rs

* fmt

* rerun ci

* rerun ci

* Update post_view.rs

* rerun ci

* rerun ci

* Update post_view.rs

* Use `exists`

* Update post_view.rs

* Update post_view.rs

* Update post_view.rs

* rerun ci

* Update post_view.rs

* person_id_join parameter

* rerun ci

* fmt

* Update post_view.rs

* rerun ci

* Update post_view.rs

* rerun ci

* fmt

* Update post_view.rs

* fmt

* Use into_sql

* Update post_view.rs

* Use inferred query source for BoxableExpression

* Update post_view.rs

* Update post_view.rs

* Update community.rs

* Update community.rs

* Update post_view.rs

* fmt

* Update community.rs

* Update community.rs

* Update community.rs

* Update community.rs

* Update community.rs

* Update post_view.rs

* Update community.rs

* fmt

* Update post_view.rs

* Update post_view.rs

* Update post_view.rs

* Update post_view.rs

* Update post_view.rs

* Update post_view.rs

* Update post_view.rs

* fmt

* Update post_view.rs

* Update post_view.rs

* fix

* trigger ci

---------

Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
Co-authored-by: phiresky <phireskyde+git@gmail.com>
2023-09-04 11:05:00 +02:00
Nick Webster
a57658d99c
Adding a new config flag to disable pictrs caching for thumbnails (#3897)
* add logic to prevent downloading remote pictrs images

* apply formatting

* Do not attempt a pictrs fetch if the remote image is also on a pictrs instance

* Do not attempt a pictrs fetch if the remote image is also on a pictrs instance and cache_federated_images is false

* Generalising the no caching option to handle all remote images

* rustfmt

* Return None if the URL is not an image

* Updating defaults.hjson

* fixing typo

* Fixing typo

* Skip cloning the Url unless we need to

* using a HEAD request for checking the content type, saving bandwidth/improving perf

* Removing early returns

* Switching back to GET requests for Content-Type because pictrs does not handle HEAD requests

* Simplifying logic and using metadata_image instead of url if we do not get a pictrs thumbnail

* Removing unused import

* Return None as a thumbnail if caching is disabled

* formatting

---------

Co-authored-by: Djones4822 <david.jones4822@gmail.com>
2023-08-31 10:36:39 -04:00