Commit Graph

53 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 bcf7ec6109
Forbid remote URLs for avatars/banners (fixes #1618) (#2132) 2 years ago
Nutomic 166ec196b0
Rework error handling (fixes #1714) (#2135) 2 years ago
Nutomic dd865c5af5
Implement instance actor (#1798)
* Implement instance actor

* wip: make site bans federate

* finish implementation and unit tests for federated bans

* start adding api tests

* fix api test

* remve site from GetCommunityResponse

* only federate site bans originating from user's home instance

* dont expose site.private_key in api
2 years ago
Dessalines e36ad9d984
Removing the site creator, adding leave_admin. Fixes #1808 (#2052)
* Removing the site creator, adding leave_admin. Fixes #1808

* Making sure there's at least one admin. Fixing unit tests
2 years ago
Dessalines e65c45f152
Adding temporary bans. Fixes #1423 (#1999)
* Adding temporary bans. Fixes #1423

* Adding ban_expires to person

* Fix clippy

* Removing ban_expires from federated fields.

* Trying to add expires to blockcommunity apub.
2 years ago
Dessalines bd31475dba Adding a banned endpoint for admins. Removing it from GetSite. Fixes #1806 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
Dessalines 05d43150bc Making public key required. Fixes #1934 3 years ago
Felix Ableitner f24999027e Merge crates db_schema and db_queries 3 years ago
Dessalines 97aa7268ae
Adding GetUnreadCount to the API. Fixes #1794 (#1842)
* Adding GetUnreadCount to the API. Fixes #1794

* Reordering filters to fix unread replies.
3 years ago
Nutomic 8067244765
Dont swallow API errors (fixes #1834) (#1837)
Dont swallow API errors (fixes #1834)
3 years ago
Nutomic f4c783cba5
Fix clippy warnings added in nightly (#1833) 3 years ago
Dessalines 864598908d
Admins can view all reports. Fixes #1810 (#1825) 3 years ago
Dessalines b18c744f63
Clean up reporting (#1776)
* First untested pass at reporting.

* Adding unit tests for post and comment report views

* Fix clippy

* Adding counts, creator_banned, and unresolved_only

* Adding my_vote to report views

* Fixing unit tests.
3 years ago
Dessalines 8708ad1b44 Moving settings and secrets to context. 3 years ago
Felix Ableitner cf214ff583 Move jwt secret from config to database (fixes #1728) 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 8a1af056e2
When banning a user, remove communities they've created (#1700)
- Fixes #1659
3 years ago
Dessalines 7b8cbbba85
Simplify config using macros (#1686)
Co-authored-by: Felix Ableitner <me@nutomic.com>
3 years ago
Dessalines fcae2189eb
Add show_new_posts_notifs setting. Fixes #1664 (#1665) 3 years ago
Dessalines f54209c451
Running clippy --fix (#1647) 3 years ago
Dessalines 880c51687a Merge branch 'main' into feature/mark_post_as_read 3 years ago
Dessalines 6d3778cafe Changing unwrap_default to unwrap_or(false) 3 years ago
Dessalines 5b2be6f9df Add show_read_posts filter. Fixes #1561 3 years ago
Dessalines f8cd6fd445 Making more fields optional in the API.
- Fixes #1569
3 years ago
Nutomic efee2062dd
Mark accounts as bot nutomic (#1565)
* Mark account as bot. Fixes #1357

* Fix clippy

* Federate bot status using actor `type` field

* fix clippy

Co-authored-by: Dessalines <tyhou13@gmx.com>
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 c3d64f996e
Removing community.creator column. Fixes #1504 (#1541)
* Removing community.creator column. Fixes #1504

* Fixing unit tests.

* Fixing federation tests.
3 years ago
Dessalines 5fff927dc4
Adding matrix id validation check. Fixes #1520 (#1538) 3 years ago
Dessalines d97129e7ae Merge branch 'main' into change_password_api 3 years ago
Nutomic bcdbced0dd
Merge pull request #1536 from LemmyNet/change_preferred_to_display_name
Changing preferred to display name. Fixes #1211
3 years ago
Nutomic 98216d8a3b
Merge pull request #1535 from LemmyNet/rust_captcha_features
Rust captcha features
3 years ago
Dessalines f33f763278 Moving ChangePassword to its own API action. Fixes #1471 3 years ago
Dessalines bf7558830f Changing preferred to display name. Fixes #1211 3 years ago
Dessalines 1ba570092e Adding more rust captcha features. Fixes #1248 3 years ago
Dessalines 2f63fdbde0 Adding a setting to show / hide scores. Fixes #1503 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
Dessalines baab2e88a5 Merge branch 'main' into move_matrix_and_admin_to_person 3 years ago
Dessalines b4276341af Adding saved_only to GetComments and GetPosts. Fixes #1513 3 years ago
Dessalines eb45bf2d0a Moving admin to person table. Fixes #1515 3 years ago
Dessalines c884510173 Creating default DB forms. Fixes #1511 3 years ago
Dessalines 1745b64ceb Moving matrix_user_id to person table. #1438 3 years ago
Dessalines 05b485b678 Merge branch 'Mart-Bogdan-1462-jwt-revocation-on-pwd-change' into jwt_revocation_dess 3 years ago
Dessalines c3efb9f7cf Strictly typing DB id fields. Fixes #1498 3 years ago
Dessalines 99e5a4d1c3 Moving send email check inside function. 3 years ago
Dessalines 8ee624a542 Some changes
- Changing claim name to local_user_id to facilitate logout.
- Changing AddAdmin back to using person_id
3 years ago