Commit Graph

250 Commits (main)

Author SHA1 Message Date
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
Dessalines a99ba2de24 Version 0.13.0 3 years ago
Dessalines 5a281445a3
Upgrade deps (#1799)
* Upgrade deps

* Fix web::scope
3 years ago
Dessalines 37bd9e0e6c Version 0.13.0-rc.1 3 years ago
Dessalines e9891977ee Version 0.12.2-rc.1 3 years ago
Dessalines df997dff49 Version 0.12.0 3 years ago
Dessalines e19349343a Version 0.12.0-rc.2 3 years ago
Dessalines 2c8003a9fa
Upgrading deps (#1735) 3 years ago
Dessalines da5fdae006 Version 0.12.0-rc.1 3 years ago
Dessalines af225a42d0
Fix prod deploy script and clippy (#1724)
* Updating lemmy-js-client.

* Fix prod deploy script and clippy

* Try using buster.

* Using more generic and updated images.

* again.

* again.

* Try alternate env

* again.

* again.

* Version 0.11.4-rc.24

* again.

* Better old_tag

* Version 0.11.4-rc.27

* Updating cargo.lock

* Trying to run a cargo check to update the lock

* Version 0.11.4-rc.28
3 years ago
Dessalines 1f64db6a33 Upgrading deps 3 years ago
Felix Ableitner a44b5c9c36 publish to crates.io with normal release script 3 years ago
Felix Ableitner af6aa3c0bf Distribute Lemmy via crates.io 3 years ago
Felix Ableitner abd26aeab2 Remove brotli, zstd dependencies 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 9840f5c1c1
Upgrading deps, running clippy fix on nightly 1.55.0 (#1638)
* Upgrading deps, running clippy fix on nightly 1.55.0

* Running clippy --fix

* Trying to fix transform

* Trying to fix another transform

* Upgrading http-signature-normalization-actix

* Fix app_data

* Fix pictrs uploading

* Fix unwrap
3 years ago
Felix Ableitner 722cdb78ba Split lemmy_apub crate into two parts apub and apub_receive 3 years ago
Felix Ableitner 249fcc5066 Split api crate into api_structs and api 3 years ago
Andrew Yoon e78ba38e94
Use URL type in most outstanding struct fields (#1468)
* Use URL type in most outstanding struct fields

This fixes all known remaining cases where url fields are stored as
plain strings, with the exception of form fields where empty strings
are used as sentinels (see `diesel_option_overwrite_to_url`).

Tested for regressions in the federated docker setup attempting to
exercise all changed fields, including through apub federation.

Fixes #1385

* Add migration to fix blank-string post.url values to be null

This also then fixes #602

* Address review feedback

- Fixed some unwraps and err message formatting
- Bumped the `url` library to 2.2.1 to fix a bug with serde error
  messages
- Add unit tests for the two diesel option override functions
- Fix migration teardown by adding a no-op

* Rename lemmy_db_queries::Url to lemmy_db_queries::DbUrl

* fix compile error

* box PostOrComment variants
3 years ago
Felix Ableitner 3bdd78f341 Rename `lemmy_structs` to `lemmy_api_structs` 3 years ago
Andrew Yoon 600ae662a5 Support plain `cargo test` and disable unused doctests for speed
Since DB tests execute diesel migrations automatically, concurrent
execution causes flaky failures from simultaneous migrations. This can
be worked around using `cargo test --workspace -- --test-threads=1`,
which is what the CI config does, but this is not intuitive for
newcomer developers and unnecessarily slows down the test suite for
the majority of tests which are safe to run concurrently. This fixes
this issue by integrating with the small test crate `serial_test` and
using it to explicitly mark DB tests to run sequentially while
allowing all other tests to run in parallel.

Additionally, this greatly improves the speed of `cargo test` by
disabling doc-tests in all crates, since these are aren't currently
used and cargo's doc-test pass, even when no doc-tests exist, has
significant overhead. On my machine, this change significantly
improves test suite times by about 85%, making it much more practical
to develop with tools like `cargo watch` auto-running tests.
3 years ago
Felix Ableitner 999d9f4d6c Move routes into separate crate to speed up compilation 3 years ago
Dessalines 1857f02af8 Moving back tokio and reqwest. 3 years ago
Dessalines 10f0b3b877 Trying to upgrade lemmys deps. 3 years ago
Dessalines 0fd0279543
Adding some recurring lemmy tasks. (#1386)
* Adding some recurring lemmy tasks.

- Add active users by day, week, month, and half year to site and
  community. Fixes #1195
- Periodically re-index the aggregates tables that use hot_rank.
  Fixes #1384
- Clear out old activities (> 6 months). Fixes #1133

* Some cleanup, recalculating actives every hour.
3 years ago
Felix Ableitner 3b64c58198 Move most code into crates/ subfolder 3 years ago
Dessalines 25dd1a21e2
Try arm fix (#1356)
* Trying to fix arm build.

* Version 0.9.0-rc.8

* Trying to fix arm build 2.

* Version 0.9.0-rc.9

* Checking time when removing lto.

* Version 0.9.0-rc.10

* Adding back in arm tests.

* Version 0.9.0-rc.11
3 years ago
Felix Ableitner a10974ed6e Set debug=0 in cargo.toml to speed up builds 3 years ago
Felix Ableitner 95e30f0e08 Split up lemmy_db_views, put lemmy_rate_limit into lemmy_utils 3 years ago
Felix Ableitner d5efebbf47 Split lemmy_db into lemmy_db_queries, lemmy_db_aggregates and lemmy_db_views 3 years ago
Dessalines e5a65d5807 Upgrading deps. 3 years ago
Dessalines 1a0d1f64f0 Merge remote-tracking branch 'origin/split-db-workspace' into move_views_to_diesel_split 3 years ago
Dessalines d767dd998e Merge branch 'drone-io-dess' into move_views_to_diesel_drone 3 years ago
Felix Ableitner 089d812dc8 Split lemmy_db into separate workspaces 3 years ago
Dessalines 4c79e26078 Updating deps. 3 years ago
Felix Ableitner 9cb7680211 fix release build? 3 years ago
Felix Ableitner cbe5cf8ca0 try to run migrations on db connection in tests 3 years ago
Felix Ableitner 08748bbede try to init db from lemmy in tests 3 years ago
Felix Ableitner 08ab85a9d5 Remove logging to find bug (yerbamate.ml/LemmyNet/lemmy/pulls/146) 3 years ago
Dessalines b92e7eb781 Updating cargo deps, fixing image if_some deprecation. 3 years ago
Felix Ableitner 964d95de5c Fix unit tests 4 years ago
Dessalines 7ef044231f
Update cargo deps, upgrading lettre. #789 (#1234)
* Update cargo deps, upgrading lettre. #789

* Adding a comment

* Adding some better expect messages.

* Fixing lettre email.
4 years ago
Dessalines 907f8fff4c Updating deps. 4 years ago
nutomic 442369a041 Move websocket code into workspace (#107)
Adjust dockerfiles, fix cargo.toml and remove unused deps

Merge branch 'main' into move-websocket-to-workspace

Move api code into workspace

Move apub to separate workspace

Move websocket code into separate workspace

Some code cleanup

Remove websocket dependency on API

Co-authored-by: Felix Ableitner <me@nutomic.com>
Reviewed-on: https://yerbamate.dev/LemmyNet/lemmy/pulls/107
4 years ago
Dessalines 8a7eb57c24
Add openssl (#1143)
* Adding openssl.

* Openssl didnt work, switching to rustls.
4 years ago
Dessalines 397fc74a56 Merge branch 'update-deps' into main 4 years ago
Felix Ableitner cf4cda2434 Update deps, remove rustls, dont specify patch version 4 years ago
Felix Ableitner 98c086abb9 Move websocket structs into lemmy_structs (ref #1115) 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