Commit Graph

228 Commits (main)

Author SHA1 Message Date
Dessalines 2402515fcc
Dont allow posts to deleted / removed communities. Fixes #1827 (#1828)
* Dont allow posts to deleted / removed communities. Fixes #1827

* Fixing couldnt find community error.

* Adding check in createorupdate post and comment.

* make sure post wasn't deleted or removed.

* Adding a post not deleted or removed check to creatorupdatecomment.

* Using pub(crate)
3 years ago
Nutomic b96ce81f89
Move code to apub library (#1795)
* Remove dependency of apub_lib on LemmyContext

* Move ApubObject trait to library

* Reorganize files in apub lib

* Move ActorType, signatures, activity_queue to apub library
3 years ago
Nutomic 527eefbe92
Rewrite fetcher (#1792)
* Use new fetcher implementation for post/comment

* rewrite person fetch to use new fetcher

* rewrite community to use new fetcher

* rename new_fetcher to dereference_object_id

* make ObjectId a newtype

* handle deletion in new fetcher

* rewrite apub object search to be generic

* move upsert() method out of ApubObject trait

* simplify ObjectId::new (and fix clippy)
3 years ago
Dessalines 0fbc342fe3 Fix tests 3 years ago
Dessalines 83a035082a Upgrading to lemmy-js-client 0.12.0 3 years ago
Dessalines 815b271084 Updating lemmy-js-client. 3 years ago
Dessalines c23e7cc20d
Fixing ResolveObject API and unit tests (#1713) 3 years ago
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.
3 years ago
Dessalines d85f0d087e
Blank out extra info for deleted or removed content. Fixes #1679 (#1680) 3 years ago
Felix Ableitner c1db86925f Merge apub, apub_receive crates (fixes #1621) 3 years ago
Nutomic c7de1fcf24
Apub inbox rewrite (#1652)
* start to implement apub inbox routing lib

* got something that almost works

* it compiles!

* implemented some more

* move library code to separate crate (most of it)

* convert private message handlers

* convert all comment receivers (except undo comment)

* convert post receiver

* add verify trait

* convert community receivers

* add cc field for all activities which i forgot before

* convert inbox functions, add missing checks

* convert undo like/dislike receivers

* convert undo_delete and undo_remove receivers

* move block/unblock activities

* convert remaining activity receivers

* reimplement http signature verification and other checks

* also use actor type for routing, VerifyActivity and SendActivity traits

* cleanup and restructure apub_receive code

* wip: try to fix activity routing

* implement a (very bad) derive macro for activityhandler

* working activity routing!

* rework pm verify(), fix tests and confirm manually

also remove inbox username check which was broken

* rework following verify(), fix tests and test manually

* fix post/comment create/update, rework voting

* Rewrite remove/delete post/comment, fix tests, test manually

* Rework and fix (un)block user, announce, update post

* some code cleanup

* rework delete/remove activity receivers (still quite messy)

* rewrite, test and fix add/remove mod, update community handlers

* add docs for ActivityHandler derive macro

* dont try to compile macro comments
3 years ago
Dessalines 904709e3f1 Upgrade api_test deps 3 years ago
Dessalines f196f05f20
Upgrading api test deps (#1608) 3 years ago
Nutomic aa79c5131f
Implement federated bans (fixes #1298) (#1553)
* Implement federated bans (fixes #1298)

* mod actions should always be federated to affected user, in addition to followers

* Make Undo/Block work for remote mods

* clippy fix

* fix federation test

* vscodium doesnt auto-save changes...
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 bf7558830f Changing preferred to display name. Fixes #1211 3 years ago
Dessalines 2309088b03 Renaming to api/v3 3 years ago
Dessalines c2f8695c9a Version 0.10.0-rc.12 3 years ago
Felix Ableitner 4f54108a9c Merge branch 'main' into federated-moderation 3 years ago
Felix Ableitner 4f7dca7c2b Fix three federation test cases 3 years ago
Dessalines 434fb53dd1 Trying to fix API tests. 3 years ago
Felix Ableitner 66946117e1 Upgrade Rust version 3 years ago
Dessalines 462c4a2954
Rewrite settings implementation. Fixes #1270 (#1433)
* A first attempt at using deser-hjson. Fixes #1270

* Trying to fix tests, try 1

* Trying to fix tests, try 2

* A few fixes to deser_hjson

- Removing unwrap_or_defaults, using impl functions.
- Reorganized settings

* Make clippy happy

* hjson list strings must be quoted.

* Adding support for env vars.

* Moving to structs and defaults file.

* Moving settings default and struct.
3 years ago
Dessalines cf911c023d
Add listing type to list communities (#1380)
* Adding listing type to ListCommunities. Fixes #1379

* Upgrading lemmy-js-client.
3 years ago
Dessalines ee03cf8ae9
Explicit error http status codes (#1362)
* Trying to type specific errors.

* Using @asonix 's downcast method.
3 years ago
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`.
3 years ago
Dessalines 1e0c32f7a3 Merge branch 'main' into move_views_to_diesel 3 years ago
Dessalines 61c6f33103 Trying to fix save user settings. 3 years ago
dependabot[bot] 632d8f384a
Bump node-notifier from 8.0.0 to 8.0.1 in /api_tests (#1332)
Bumps [node-notifier](https://github.com/mikaelbr/node-notifier) from 8.0.0 to 8.0.1.
- [Release notes](https://github.com/mikaelbr/node-notifier/releases)
- [Changelog](https://github.com/mikaelbr/node-notifier/blob/v8.0.1/CHANGELOG.md)
- [Commits](https://github.com/mikaelbr/node-notifier/compare/v8.0.0...v8.0.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
3 years ago
Dessalines 929f1d02b5 Fixing integration 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 9d0709dfe8 Trying again. 3 years ago
Dessalines 2e5297e337 Trying again. 3 years ago
Dessalines 5c266302c5 Adding unfollows. 3 years ago
Dessalines caaf6b178b Trying again. 3 years ago
Dessalines 583808d5e7 Trying again. 3 years ago
Dessalines 5768a4eda7 Trying again. 3 years ago
Dessalines 4997d4b0b5 Trying again. 3 years ago
Dessalines 179709cc09 Fixing drone tests. 3 years ago
Felix Ableitner e492cce206 Allow running docker-less federation tests locally 3 years ago
Felix Ableitner d5955b60c0 silence lemmy output in federation logs 3 years ago
Felix Ableitner f33577b317 send activities sync for tests 3 years ago
Dessalines ccd26bfcd7 Trying to fix post test again. 3 years ago
Dessalines f6ba6d5590 Trying to fix post test again. 3 years ago
Dessalines dfe17662df Trying to fix post test again. 3 years ago
Dessalines 28c217eb66 Trying to fix post test again. 3 years ago
Dessalines d594005d49 Trying to fix post test again. 3 years ago
Dessalines 4410d2e44d Trying to fix post test again. 3 years ago
Dessalines 5dff60adc5 Trying to fix post test again. 3 years ago
Dessalines 9e5824df85 Trying to fix post test. 3 years ago
Felix Ableitner 543be801ab disable debug log 3 years ago
Felix Ableitner ab6b28ee60 use dash 3 years ago
Felix Ableitner 0c89e9c2d6 use hosts file 3 years ago
Felix Ableitner 30a1a69850 setup db 3 years ago
Felix Ableitner 9c7f2cb0c3 fix bin path 3 years ago
Felix Ableitner b61bfcefa7 find the binary 3 years ago
Felix Ableitner 7c12b1026c faster release build 3 years ago
Felix Ableitner 5b376de5f5 need to use release bin 3 years ago
Felix Ableitner df2ec0aa38 try running federation tests in same alpine version 3 years ago
Felix Ableitner 4fd6b5f5e1 fix script location 3 years ago
Felix Ableitner 405e7eff27 try to fix federation test 3 years ago
Felix Ableitner 7af4a60ec4 change dir to read config 3 years ago
Felix Ableitner 7b2c59bd98 use bash, install psql 3 years ago
Felix Ableitner 580e397525 dont use alpine for federation test 3 years ago
Felix Ableitner 7717deda0e more debug 3 years ago
Felix Ableitner cdcbef088d more debugging 3 years ago
Felix Ableitner 94d6ceb4df install bash and curl 3 years ago
Felix Ableitner 200913f631 try with sh 3 years ago
Felix Ableitner f76f742ba7 implement federation test in bash 3 years ago
Dessalines ff8acfb8de Adding some more integration tests for locked posts and bans. 4 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
Dessalines c348e788e4 Adding optional community_name field to search. Fixes #1057 4 years ago
Dessalines 6c8a5723f8 Trying to add some long delays. 4 years ago
Dessalines 5dbb2b45cb Upgrade api test deps. 4 years ago
Dessalines 7bdb1abbe6
Published user time (#1141)
* Adding published time to UserForm.

- Federates user creation time. Fixes #1140

* Check the user published time.
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