Commit Graph

25 Commits (375d9a2a3cf9c023ac6ac832d98f1b456fb9e2ce)

Author SHA1 Message Date
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>
8 months ago
biosfood 384e55f0e4
update moderator view (#3820)
* update api tests for new moderator view

* chage moderator view to be a listing type in get posts

Note: Internally, the listing type is called ListingType.ModeratorView,
but it's called "Moderator View" in the api endpoint

* fix formatting

* add support for moderator view to list comments

* add api test for moderator view when listing comments

* fix api test formatting

* retry tests

* don't filter out blocked users and communities when using moderator view

* fix cargo tests failing

* fix formatting

* fix previous merge

* Adding ModeratorView to listing_type_enums

* Fixing fmt.

* Adding a default to ListingType.

* Upgrading to use new lemmy-js-client.

---------

Co-authored-by: Nutomic <me@nutomic.com>
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
Co-authored-by: Dessalines <tyhou13@gmx.com>
9 months ago
Freakazoid182 51ccf318e8
Lowercase domain on db query filters (#3849) (#3873)
* Lowercase domain on db query filters (#3849)

* Add test to get a community on different cased domain (#3849)

* Lowercase the identity for webfinger (#3849)

* Lowercase both sides of the domain comparison (#3849)

* Format api_tests (#3849)

* Lowercase domain lookup on Instance and Person (#3849)

---------

Co-authored-by: Freek van Zee <freek.van.zee@mediamonks.com>
Co-authored-by: Freakazoid182 <>
9 months ago
biosfood 2de994797e
Add moderator view parameter to list posts (#3176)
* add option to only show posts from moderated communities

* rename moderated_only to moderator_view and show blocked users in moderator view

* add test for moderator view

* bump lemmy-js-client version for moderation view tests

* fix yarn lockfile

* retry build

* Delete logfile

* retry checks

* remove unused select statement from list posts

---------

Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
10 months ago
Dessalines e17f0097ff
Fix federation test errors with new lemmy-js-client (#3678) 10 months ago
Dessalines 2a088cf023
Update prettier to 3.0.0 (#3509)
* Update prettier to 3.0.0

* Updating prettier dep.

* Explicity 3.0.0 version.
11 months ago
Dessalines 88a0d2feec
Adding typescript generation for API. Fixes #2824 (#2827)
* Adding typescript generation for API. Fixes #2824

* Try to fix Ltree issue 1.

* Forgot a few types.

* Fixing api tests.

* Removing url_serde line.

* Manually deriving TS for some types.
1 year ago
Dessalines 0630d214e3
Removing sniptt/monads for lemmy-js-client. (#2644)
* Removing sniptt/monads for lemmy-js-client.

* Fix tests.
1 year ago
Felix Ableitner c6c52ab9cc Add SendActivity trait so that api crates compile in parallel with lemmy_apub 1 year ago
Dessalines 235cc8b228
Moving settings to Database. (#2492)
* Moving settings to Database.

- Moves many settings into the database. Fixes #2285
- Adds a local_site and instance table. Fixes #2365 . Fixes #2368
- Separates SQL update an insert forms, to avoid runtime errors.
- Adds TypedBuilder to all the SQL forms, instead of default.

* Fix weird clippy issue.

* Removing extra lines.

* Some fixes from suggestions.

* Fixing apub tests.

* Using instance creation helper function.

* Move forms to their own line.

* Trying to fix local_site_data, still broken.

* Fixing federation tests.

* Trying to fix check features 1.

* Addressing PR comments.

* Adding check_apub to all verify functions.
2 years ago
Nutomic ec5e63b5a9
Fix check for federated mod actions (#2489) 2 years ago
Dessalines 9c3efe32e7
First pass at adding comment trees. (#2362)
* First pass at adding comment trees.

- Extracted comment replies into its own table.
- Added ltree column to comment
- Added parent_id param to GetComments to fetch a tree branch
- No paging / limiting yet

* Adding child_count to comment_aggregates.

* Adding parent comment update counts

* Fix unit tests.

* Comment tree paging mostly done.

* Fix clippy

* Fix drone tests wrong postgres version.

* Fix unit tests.

* Add back in delete in unit test.

* Add postgres upgrade script.

* Fixing some PR comments.

* Move update ltree into Comment::create

* Updating based on comments.

* Fix send soft fail.
2 years ago
Dessalines eafb3869f2
Revert "Add pending, and change use specific API response for FollowCommunity…" (#2283) 2 years ago
Dessalines ed9b66541e Fixing API tests. 2 years ago
Dessalines d9ecabee87
Dont blank out post or community info. Fixes #1813 (#1841)
* Dont blank out post or community info. Fixes #1813

* Fix federation tests

* Only blank out info for non-logged in users.

* Remove pointless trait.

* Blank the community if deleted for post

* Fix hook

* Fixing again

* Fixing again

* Fixing again
3 years ago
Dessalines c23e7cc20d
Fixing ResolveObject API and unit tests (#1713) 3 years ago
Dessalines d85f0d087e
Blank out extra info for deleted or removed content. Fixes #1679 (#1680) 3 years ago
Dessalines c3d64f996e
Removing community.creator column. Fixes #1504 (#1541)
* Removing community.creator column. Fixes #1504

* Fixing unit tests.

* Fixing federation tests.
3 years ago
Dessalines 434fb53dd1 Trying to fix API tests. 3 years ago
Dessalines d767dd998e Merge branch 'drone-io-dess' into move_views_to_diesel_drone 3 years ago
Dessalines 5af8257e19 Changing unit tests to api v2. 3 years ago
Dessalines 179709cc09 Fixing drone tests. 3 years ago
nutomic b7d2dac9bf Fix federation of community removal/deletion, added docs (#125)
Adding a federation test for community deletes / removes.

Add missing docs for community deletion/removal (fixes #1250)

Fix federation of community deletion/removal (fixes #1253)

Co-authored-by: Dessalines <tyhou13@gmx.com>
Co-authored-by: Felix Ableitner <me@nutomic.com>
Reviewed-on: https://yerbamate.dev/LemmyNet/lemmy/pulls/125
4 years ago
Felix Ableitner cdb02c992c Add tests for avatars, banners and more 4 years ago
Dessalines 5c6258390c
Isomorphic docker (#1124)
* Adding a way to GetComments for a community given its name only.

* Adding getcomments to api docs.

* A first pass at locally working isomorphic integration.

* Testing out cargo-husky.

* Testing a fail hook.

* Revert "Testing a fail hook."

This reverts commit 0941cf1736.

* Moving server to top level, now that UI is gone.

* Running cargo fmt using old way.

* Adding nginx, fixing up docker-compose files, fixing docs.

* Trying to re-add API tests.

* Fixing prod dockerfile.

* Redoing nightly fmt

* Trying to fix private message api test.

* Adding CommunityJoin, PostJoin instead of joins from GetComments, etc.

- Fixes #1122

* Fixing fmt.

* Fixing up docs.

* Removing translations.

* Adding apps / clients to readme.

* Fixing main image.

* Using new lemmy-isomorphic-ui with better javascript disabled.

* Try to fix image uploads in federation test

* Revert "Try to fix image uploads in federation test"

This reverts commit a2ddf2a90b.

* Fix post url federation

* Adding some more tests, some still broken.

* Don't need gitattributes anymore.

* Update local federation test setup

* Fixing tests.

* Fixing travis build.

* Fixing travis build, again.

* Changing lemmy-isomorphic-ui to lemmy-ui

* Error in travis build again.

Co-authored-by: Felix Ableitner <me@nutomic.com>
4 years ago