Commit graph

36 commits

Author SHA1 Message Date
Nutomic ceff2ec686
Use enum for registration mode setting (#2604)
* Use enum for registration mode setting

* fix tests
2023-01-05 01:42:30 +00:00
Dessalines 0630d214e3
Removing sniptt/monads for lemmy-js-client. (#2644)
* Removing sniptt/monads for lemmy-js-client.

* Fix tests.
2023-01-04 10:59:26 -05:00
Anon 9dfd819691
Add support for Featured Posts (#2585)
* Add support for Featured Posts

* Fix rebase

* More fixes
2022-12-12 11:17:10 +00:00
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.
2022-10-27 09:24:07 +00:00
Nutomic 6c3e984ad1
Only allow authenticated users to fetch remote objects (#2493)
* Only allow authenticated users to fetch remote objects

* try to fix api tests
2022-10-13 16:30:31 +00:00
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.
2022-07-30 05:55:59 +02:00
Dessalines ff026dc3ff
Adding check for requests with no id or name, adding max limit. (#2265)
* Adding check for requests with no id or name, adding max limit.

* Consolidating a few functions.

* Fix page min

* Adding more websocket rate limits.

* Add check to GetCommunity

* Use a default message rate limit check.

* Adding a page and limit checker

* Fix clippy

* Fix clippy again

* Adding check for requests with no id or name, adding max limit.

* Consolidating a few functions.

* Fix page min

* Adding more websocket rate limits.

* Add check to GetCommunity

* Use a default message rate limit check.

* Adding a page and limit checker

* Fix clippy

* Fix clippy again

* Fix limit request.

* Move checks to inside limit_and_offset

* Fixing API tests.

* Change NotFound diesel errors to QueryBuilderError
2022-07-08 10:21:33 +00:00
Dessalines 8af913f583
Don't create or initially follow a default community. Fixes #2317 (#2328)
* Don't create or initially follow a default community. Fixes #2317

* Fix unit tests.
2022-06-22 19:38:27 +00:00
Dessalines 92d17639cd
Expose pending 2 (#2282)
* Exposing SubscribedType. Fixes #2281

* Fixing other subscribed fields.

* Fix federation tests

* Add comment about follower row.
2022-06-22 12:05:41 +00:00
Dessalines eafb3869f2
Revert "Add pending, and change use specific API response for FollowCommunity…" (#2283) 2022-05-26 11:17:04 -04:00
Dessalines ed9b66541e Fixing API tests. 2022-05-20 16:15:14 +00:00
Nutomic 7e13406979
Require registration application by default (#2229) 2022-04-19 19:13:20 +00:00
Nutomic 8337eaefdd
Federate user account deletion (fixes #1284) (#2199) 2022-04-07 20:52:17 +00:00
Dessalines 5698dd7771 Trying to fix api tests 1 2022-03-22 15:50:47 -04:00
Nutomic bcf7ec6109
Forbid remote URLs for avatars/banners (fixes #1618) (#2132) 2022-03-18 15:46:58 +00:00
Nutomic dd865c5af5
Implement instance actor (#1798)
* Implement instance actor

* wip: make site bans federate

* finish implementation and unit tests for federated bans

* start adding api tests

* fix api test

* remve site from GetCommunityResponse

* only federate site bans originating from user's home instance

* dont expose site.private_key in api
2022-02-07 19:23:12 +00:00
Kradyz 9f64872d5a
Case-insensitive webfinger response. Fixes #1955 & #1986 (#2005)
* Make webfinger case insensitive

* Make webfinger case insensitive

* Case insensitive domain name

* Case-insensitive webfinger

* formatting

Co-authored-by: Kradyz <k@radiz.nl>
2021-12-20 17:23:06 -05:00
Nutomic 18badcfdb4
Federate reports (#1830)
* Federate reports

* add federation test cases for reports
2021-10-15 10:37:33 -04:00
Dessalines 0fbc342fe3 Fix tests 2021-09-19 17:20:47 -04:00
Dessalines c23e7cc20d
Fixing ResolveObject API and unit tests (#1713) 2021-08-23 17:25:39 +02:00
Dessalines 2016afc9db
User / community blocking. Fixes #426 (#1604)
* A first pass at user / community blocking. #426

* Adding unit tests for person and community block.

* Moving migration

* Fixing creator_blocked for comment queries, added tests.

* Don't let a person block themselves

* Fix post creator_blocked

* Adding creator_blocked to PersonMentionView

* Moving blocked and follows to MyUserInfo

* Rename to local_user_view

* Add moderates to MyUserInfo

* Adding BlockCommunityResponse

* Fixing name, and check_person_block

* Fixing tests.

* Using type in Blockable trait.

* Changing recipient to target, adding unfollow to block action.
2021-08-19 20:54:15 +00:00
Dessalines 2309088b03 Renaming to api/v3 2021-03-29 11:26:15 -04:00
Dessalines 434fb53dd1 Trying to fix API tests. 2021-03-12 14:09:03 -05:00
Dessalines 1de8a4606a A few API v2 changes based on nutomic's suggestions.
- Changed `edit_id` s to their type (comment_id)
- Moved websocket actions to their own file in structs and api.
- Got rid of UserViewDangerous, added UserSafeSettings.
  - GetSite now returns UserSafeSettings for `my_user`.
- Got rid of `admin` field in `Register`.
2021-01-18 16:57:31 -05:00
Dessalines 61c6f33103 Trying to fix save user settings. 2021-01-04 14:09:53 -05:00
Dessalines d767dd998e Merge branch 'drone-io-dess' into move_views_to_diesel_drone 2020-12-20 21:48:29 -05:00
Dessalines 5af8257e19 Changing unit tests to api v2. 2020-12-20 16:16:57 -05:00
Dessalines 179709cc09 Fixing drone tests. 2020-12-17 14:01:33 -05:00
Felix Ableitner f33577b317 send activities sync for tests 2020-12-14 17:44:27 +01:00
Dessalines 28c217eb66 Trying to fix post test again. 2020-12-11 23:20:18 -05:00
Dessalines d594005d49 Trying to fix post test again. 2020-12-11 20:20:14 -05:00
Dessalines ff8acfb8de Adding some more integration tests for locked posts and bans. 2020-11-10 10:53:35 -06:00
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
2020-11-05 20:19:06 +00:00
Dessalines 6c8a5723f8 Trying to add some long delays. 2020-10-01 08:32:01 -05:00
Felix Ableitner cdb02c992c Add tests for avatars, banners and more 2020-09-17 17:41:51 +02:00
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>
2020-09-15 15:26:47 -04:00
Renamed from ui/src/api_tests/shared.ts (Browse further)