Commit Graph

31 Commits (1870dc8cd9ba182ab8753c09af93abc6dd4e219e)

Author SHA1 Message Date
nutomic 1870dc8cd9 Split lemmy_utils into multiple files (#96)
Update dependencies

Move send_local_notifs into lemmy_api_structs (ref #1115)

Split lemmy_utils into multiple files

Co-authored-by: Felix Ableitner <me@nutomic.com>
Reviewed-on: https://yerbamate.dev/LemmyNet/lemmy/pulls/96
4 years ago
Felix Ableitner 353e2e027a Move api structs and rate limit into separate workspaces 4 years ago
nutomic 14f2d190e5 Implement context (#86)
Implement context

Co-authored-by: Felix Ableitner <me@nutomic.com>
Reviewed-on: https://yerbamate.dev/LemmyNet/lemmy/pulls/86
4 years ago
andor0 b6411aba7a
Migrate from failure to anyhow and thiserror (#1042)
* Migrate from failure to anyhow and thiserror

* Replace 'format_err!' to 'anyhow!'
4 years ago
nutomic 80aef61aed Split code into cargo workspaces (#67)
More fixes

- fixed docker builds
- fixed mentions regex test
- fixed DATABASE_URL stuff
- change schema path in diesel.toml

Address review comments

- add jsonb column back into activity table
- remove authors field from cargo.toml
- adjust LEMMY_DATABASE_URL env var usage
- rename all occurences of LEMMY_DATABASE_URL to DATABASE_URL

Decouple utils and db

Split code into cargo workspaces

Co-authored-by: Felix Ableitner <me@nutomic.com>
Reviewed-on: https://yerbamate.dev/LemmyNet/lemmy/pulls/67
4 years ago
Riley a074564458
Federation async (#848)
* Asyncify more

* I guess these changed

* Clean PR a bit

* Convert more away from failure error

* config changes for testing federation

* It was DNS

So actix-web's client relies on TRust DNS Resolver to figure out
where to send data, but TRust DNS Resolver seems to not play nice
with docker, which expressed itself as not resolving the name to
an IP address _the first time_ when making a request. The fix was
literally to make the request again (which I limited to 3 times
total, and not exceeding the request timeout in total)

* Only retry for connecterror

Since TRust DNS Resolver was causing ConnectError::Timeout,
this change limits the retry to only this error, returning
immediately for any other error

* Use http sig norm 0.4.0-alpha for actix-web 3.0 support

* Blocking function, retry http requests

* cargo +nightly fmt

* Only create one pictrs dir

* Don't yarn build

* cargo +nightly fmt
4 years ago
Felix 9e61c3be94 Rework imports 4 years ago
Dessalines 70060c27b2 Adding activity table inserts. 4 years ago
Dessalines 66a2c4a2c3 Some fed fixes. 4 years ago
Dessalines 0425e8b114 Fixing nodeinfo error type. 4 years ago
Dessalines 18e570b021 Merge branch 'master' into merge_master_2 4 years ago
Dessalines 809cc1049e Fixing closures. 4 years ago
Dessalines d98c936295 Adding web::blocks to routes. 4 years ago
Dessalines f0026065f5 Merge branch 'master' into federation_merge_from_master_1 4 years ago
Dessalines f300c67a4d Adding websocket notification system.
- HTTP and APUB clients can now send live updating messages to websocket
  clients
- Rate limiting now affects both HTTP and websockets
- Rate limiting / Websocket logic is now moved into the API Perform
  functions.
- TODO This broke getting current online users, but that will have to
  wait for the perform trait to be made async.
- Fixes #446
4 years ago
Felix 9c974fbe50 Remove instance follows 4 years ago
Felix Ableitner 6962b9c433 Use Url instead of String 4 years ago
Felix Ableitner 6a7a262912 Merge branch 'federation_add_fed_columns' of https://yerbamate.dev/dessalines/lemmy into federation 4 years ago
Felix Ableitner 96c3621a80 Share list of communities over apub, some refactoring 4 years ago
Dessalines 31f835db86 Merge branch 'master' into federation 4 years ago
Dessalines 1571a4acd4 Changing markdown parser to comrak. Moving crate imports to lib.rs. 4 years ago
Felix Ableitner 390b204272 Rewrite federation settings 4 years ago
Felix Ableitner bd030470b1 Read remote nodeinfo before doing anything 4 years ago
Felix bd34b2a083 Use actual structs for nodeinfo 4 years ago
Dessalines a7a0d35ed3 Fixing nodeinfo endpoint. 5 years ago
Dessalines aeec25838a Cleaning up nodeinfo. 5 years ago
Dessalines dff8b947bb Trying to add r2d2 connection pooling to websockets. 5 years ago
Felix 4361f48b98 Make various functions async 5 years ago
Felix Ableitner d08e09fbdc Apply changes suggested by cargo clippy (fixes #395) 5 years ago
Dessalines cd9df4455e Adding open_registration to nodeinfo. 5 years ago
Felix Ableitner 80f76f2efd Use actix config to handle routes in seperate folders (#378) 5 years ago