Commit graph

102 commits

Author SHA1 Message Date
Dessalines bc523abd62
Add a simple linked instances page. Fixes #1070 (#1071)
* Add a simple linked instances page. Fixes #1070

* Changing allowed_instances to federated_instances.
2020-08-11 10:58:32 -04:00
Dessalines 048271f59b Remove allowed thumbnail sizes for now. 2020-08-05 13:53:59 -04:00
nutomic c34fffc2c4 Proxy pictrs requests through Lemmy (fixes #371) (#77)
fix check_only value for image rate limit

Fix image rate limit

Add rate limit for image uploads

Proxy pictrs requests through Lemmy (fixes #371)

Co-authored-by: Felix Ableitner <me@nutomic.com>
Reviewed-on: https://yerbamate.dev/LemmyNet/lemmy/pulls/77
2020-08-05 16:00:00 +00:00
andor0 b6411aba7a
Migrate from failure to anyhow and thiserror (#1042)
* Migrate from failure to anyhow and thiserror

* Replace 'format_err!' to 'anyhow!'
2020-08-01 14:04:42 +00:00
Felix Ableitner 678e1fa927 Add community outbox (ref #1018) 2020-07-29 22:49:52 +02:00
Felix Ableitner cee72065e9 Merge branch 'main' into inbox-refactoring 2020-07-29 15:41:05 +02:00
Dessalines 49bd28e2d4
Adding visual captchas for register and login. (#1027)
* Adding visual captchas for register and login.

* Adding audio wav file for Captcha using espeak.

* Lots of captcha fixes.

- Removed login captchas.
- Added settings to disable captchas, and change difficulty.
- Captchas can only be checked / used once, front end gives a new one on
  failure.
- Added front end button for regenerating captcha.
- Added a disabled / pause button audio playing.

* Some more fixes.
2020-07-29 09:02:46 -04:00
Dessalines e605d58888 Merge branch 'main' into inbox-refactoring-merge 2020-07-28 12:08:28 -04:00
Felix Ableitner 1ed7c59491 Refactor inbox, simplify and split into multiple files 2020-07-28 14:41:15 +02:00
Dessalines 2eac037408 Adding post delete, remove, lock, and sticky. 2020-07-20 23:46:36 -04:00
Dessalines fd96dfdb5e Added comment delete, remove, read. 2020-07-20 21:37:44 -04:00
Dessalines 9bc6698f58 Added community delete and remove. 2020-07-20 13:37:39 -04:00
Dessalines a67f46bec5 EditUserMention changed to MarkUserMentionAsRead. 2020-07-20 10:56:40 -04:00
Dessalines 0a28ffb9c4 Private message delete and read extracted. 2020-07-20 00:29:44 -04:00
Riley 8f745b80d3
Wrap each inbox route individually (#954) 2020-07-13 09:55:55 -04:00
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
2020-07-10 18:15:41 +00:00
Felix Ableitner d03c435563 Revert "Verify activitypub payload digests (#885)"
This reverts commit 916592944a.
2020-07-06 14:20:29 +02:00
Riley 916592944a
Verify activitypub payload digests (#885) 2020-07-03 13:22:39 -04:00
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
2020-07-01 08:54:29 -04:00
Felix Ableitner 0f1a8ec928 Merge branch 'master' into federation 2020-06-09 14:01:26 +02:00
Felix Ableitner 8f9bd1fef7 get some more things working 2020-05-28 15:20:12 +02:00
Felix cac7011d53 move logic to sharedinbox 2020-05-28 13:44:52 +02:00
Dessalines 80653a5317
Remove federation option from master. (#745) 2020-05-25 18:48:24 -04:00
Dessalines f15c3b4e1e Merge branch 'yerba_rework-imports' into federation 2020-05-16 21:09:26 -04:00
Felix 9e61c3be94 Rework imports 2020-05-16 20:04:17 +02:00
Dessalines 940dc73f28 Federated mentions. Fixes #681 (#717)
* Federated mentions. Fixes #681

* Changing some todos, adding comments.
2020-05-15 12:36:11 -04:00
Felix bb1b4ee33e Comment search and apub endpoint 2020-05-14 12:42:26 +02:00
Dessalines 15f1920b25 Federated private messages. 2020-05-05 22:06:24 -04:00
Dessalines 70060c27b2 Adding activity table inserts. 2020-04-27 18:17:02 -04:00
Dessalines 22abbebd41 Lots of additions to federation.
- Added a shared inbox.
- Added federated comments, comment updates, and tests.
- Abstracted ap object sends into a common trait.
2020-04-27 12:57:00 -04:00
Dessalines d846740839 Some more cleanup. 2020-04-24 15:55:54 -04:00
Dessalines 66a2c4a2c3 Some fed fixes. 2020-04-24 10:04:36 -04:00
Felix 70816a4779 Fix header guard for apub responses 2020-04-22 20:56:31 +02:00
Dessalines 313d023eef Changing wait to spawn in websocket. 2020-04-22 00:29:25 -04:00
Dessalines 92e30311ce Merge branch 'federation' of https://yerbamate.dev/LemmyNet/lemmy into federation 2020-04-21 20:41:50 -04:00
Dessalines 0425e8b114 Fixing nodeinfo error type. 2020-04-21 20:34:37 -04:00
Dessalines 18e570b021 Merge branch 'master' into merge_master_2 2020-04-21 20:29:52 -04:00
Dessalines 809cc1049e Fixing closures. 2020-04-21 16:48:54 -04:00
Felix 957e4a2611 Change apub IDs to be consistent with html urls 2020-04-21 22:45:01 +02:00
Dessalines d98c936295 Adding web::blocks to routes. 2020-04-21 16:40:03 -04:00
Dessalines f0026065f5 Merge branch 'master' into federation_merge_from_master_1 2020-04-21 10:25:29 -04:00
asonix d11af012fc post -> register 2020-04-20 13:05:07 -05:00
asonix d058db95e5 Use get_ip in ratelimit middleware 2020-04-20 13:02:25 -05:00
asonix 904ebf34a5 Guard CreateCommunity, represent impossible error with Infallible 2020-04-20 12:31:22 -05:00
asonix db4454b52b Add websockets into the api scope 2020-04-20 10:25:47 -05:00
asonix 217efdd706 Allow rustfmt on api config 2020-04-19 23:47:20 -05:00
asonix ac43b86b60 Change RateLimit to act as a middleware 2020-04-19 22:59:07 -05:00
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
2020-04-19 18:08:25 -04:00
Felix 8908c8b184 Some code cleanup and better logging 2020-04-17 16:55:28 +02:00
Felix 9c974fbe50 Remove instance follows 2020-04-17 16:39:03 +02:00