Commit graph

940 commits

Author SHA1 Message Date
SleeplessOne1917
bee6b7a1bb Update translations 2023-09-25 06:38:23 -04:00
SleeplessOne1917
13b20b0502 Address PR feedback 2023-09-25 06:37:45 -04:00
SleeplessOne1917
ed8dae99f1 Merge branch 'main' into bearer-token 2023-09-24 17:47:17 -04:00
SleeplessOne1917
37655f0f18 chore: Run rust format 2023-09-22 21:39:03 -04:00
SleeplessOne1917
519e800b33 feat: Replace ad hoc auth header with internet standard bearer token
auth header
2023-09-22 21:26:27 -04:00
Dessalines
b16661a17d
Merge branch 'main' into comment-fix 2023-09-21 11:20:49 -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
dec25f9ee8 ensure overlap 2023-09-21 11:11:54 +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
SleeplessOne1917
bb552d7659
Merge branch 'main' into comment-fix 2023-09-20 17:38:47 +00:00
phiresky
2dbaf67b7c
Merge branch 'main' into add_federation_worker_index 2023-09-20 18:06:44 +02:00
phiresky
ae37ca0137 re-remove debug comments 2023-09-20 15:33:09 +00:00
phiresky
a808d3208a use max(id) instead of seq max value to prevent uncommitted transactions from causing skipped activities 2023-09-20 14:57:18 +00:00
Nutomic
22608ae983
Rework the way 2FA is enabled/disabled (fixes #3309) (#3959)
* Rework the way 2FA is enabled/disabled (fixes #3309)

* postgres format

* change algo to sha1 for better compat

* review comments

* review

* clippy

---------

Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
2023-09-20 10:49:54 -04: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
Dessalines
77b2d236b9
Forgot to add ts export to pagination cursor. (#3971) 2023-09-20 15:28:56 +02: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
Nutomic
50f81cf157
User can block instances (fixes #2397) (#3869)
* User can block instances (fixes #2397)

* update comments

* review comments

* use route

* update

* add api test

* update tests

* fix

* fix test

* ci

---------

Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
2023-09-20 11:56:13 +02:00
Dessalines
89b7c981f5
Fixing GetPostsResponse serialization. (#3967) 2023-09-20 11:49:26 +02:00
SleeplessOne1917
671676d7e4 Remove unused import 2023-09-18 19:40:01 -04:00
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
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
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
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
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
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
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
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