Commit Graph

20 Commits (cb44b1471705de503e609fbd835fca2a77cce2db)

Author SHA1 Message Date
Nutomic cb44b14717
WIP: Email localization (fixes #500) (#2053)
* Allow email localization (fixes #500)

* add PersonAggregates::default()

* add lemmy-translations submodule

* fix gitmodules
2 years ago
Nutomic 166ec196b0
Rework error handling (fixes #1714) (#2135) 2 years ago
Nutomic 788924d7ff
Merge different delete activities for better compatibility (fixes #2066) (#2073) 2 years ago
Dessalines c883a49a40
First pass at invite-only migration. (#1949)
* First pass at invite-only migration.

* Implement email verification (fixes #219)

* remove unwrap

* Adding views and functionality to registration application. #209

* Add private instance site column, and back end checks.

* Adding some message fields to LoginResponse

* Adding private instance to site setup.

* A few additions:

- Add a DeleteAccount response.
- RegistrationApplicationView now has the safe LocalUserSettings.
- Adding VerifyEmail to websocket API, added a proper response type.

* Adding and reorganizing some email helpers.

* A few fixes for private sites:

- Added a check_registration_application function.
- Only send a verification email if its been changed.
- VerifyEmail now returns LoginResponse.
- Deleting the old tokens after a successful email verify.
- If port is missing on email config, display a better error message.

* Version 0.15.0-rc.3

* Adding published to email_verification table.

* Adding fixes from comments.

* Version 0.15.0-rc.4

* Adding modlog private site check.

* Version 0.15.0-rc.6

Co-authored-by: Felix Ableitner <me@nutomic.com>
2 years ago
Riley 35cbae61bc
Don't drop error context when adding a message to errors (#1958)
* Respond directly with LemmyError

Instrument Perform implementations for more precise traces
Use ApiError to format JSON errors when messages are present
Keep SpanTrace output in LemmyError Display impl

* Hide SpanTrace debug output from LemmyError

* Don't log when entering spans, only when leaving

* Update actix-web

* Update actix-rt

* Add newline after error info in LemmyError Display impl

* Propogate span information to blocking operations

* Instrument apub functions

* Use skip_all for more instrument attributes, don't skip 'self' in some api actions

* Make message a static string

* Send proper JSON over websocket

* Add 'message' to LemmyError display if present

* Use a quieter root span builder, don't pretty-print logs

* Keep passwords and emails out of logs

* Re-enable logging Login

* Instrument feeds

* Emit our own errors

* Move error log after status code recording

* Make Sensitive generic over the inner type

* Remove line that logged secrets
2 years ago
Felix Ableitner c725514841 Change to_apub and from_apub to take by value and avoid cloning 3 years ago
Felix Ableitner 03d8ac75ef Move activity structs to protocol folder 3 years ago
Felix Ableitner 614490d29b Fix problem that prevented viewing of pleroma user profiles 3 years ago
Felix Ableitner 1aa0e1997b Major refactor, adding newtypes for apub crate
- this allows moving FromApub/ToApub traits into apub lib
3 years ago
Felix Ableitner f24999027e Merge crates db_schema and db_queries 3 years ago
Nutomic 8067244765
Dont swallow API errors (fixes #1834) (#1837)
Dont swallow API errors (fixes #1834)
3 years ago
Dessalines 8708ad1b44 Moving settings and secrets to context. 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
Nutomic 28d6370c35
Rewrite delete activities (#1699)
* Limit type/method visibility in apub code

* Simplify db_queries traits by removing generics

* Simplify delete activity implementation

* Rewrite delete activities

* Implement helper functions for websocket message sending

* When receiving delete reason as empty string, change to none
3 years ago
Felix Ableitner 6b57d716e1 Rewrite private message apub and merge create/update 3 years ago
Dessalines f54209c451
Running clippy --fix (#1647) 3 years ago
Nutomic 65a11a7239
Use .map_err in api code (fixes #1573) (#1575)
* Use .map_err in api code (fixes #1573)

* forgot some
3 years ago
Dessalines 4c8f2e976e Merge remote-tracking branch 'yerba/split-api-crate' into test_merge_api_crates_reorg 3 years ago
Felix Ableitner 01fc1228d5 Fix API and clippy warnings 3 years ago
Felix Ableitner 249fcc5066 Split api crate into api_structs and api 3 years ago