Commit graph

267 commits

Author SHA1 Message Date
37bd9e0e6c Version 0.13.0-rc.1 2021-09-28 10:59:29 -04:00
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.
2021-09-28 10:36:17 +00:00
8708ad1b44 Moving settings and secrets to context. 2021-09-27 11:25:26 +02:00
cf214ff583 Move jwt secret from config to database (fixes #1728) 2021-09-27 11:25:09 +02:00
527eefbe92
Rewrite fetcher (#1792)
* Use new fetcher implementation for post/comment

* rewrite person fetch to use new fetcher

* rewrite community to use new fetcher

* rename new_fetcher to dereference_object_id

* make ObjectId a newtype

* handle deletion in new fetcher

* rewrite apub object search to be generic

* move upsert() method out of ApubObject trait

* simplify ObjectId::new (and fix clippy)
2021-09-25 11:44:52 -04:00
e9891977ee Version 0.12.2-rc.1 2021-09-05 13:59:28 -04:00
df997dff49 Version 0.12.0 2021-09-03 09:23:50 -04:00
e19349343a Version 0.12.0-rc.2 2021-09-03 08:28:26 -04:00
Dessalines
2c8003a9fa
Upgrading deps (#1735) 2021-08-26 08:37:10 -04:00
da5fdae006 Version 0.12.0-rc.1 2021-08-25 17:28:42 -04:00
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
2021-08-25 17:26:10 -04:00
Dessalines
c23e7cc20d
Fixing ResolveObject API and unit tests (#1713) 2021-08-23 17:25:39 +02:00
251e0d3b82 Move resolving of activitypub objects to separate api endpoint (fixes #1584) 2021-08-20 12:35:50 +02:00
f6f169b4eb
Rewrite remaining activities (#1712)
* 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

* Rewrite remaining activities

* Simplify inbox

* Remove struct ActivityCommonFields, derive ActivityFields trait instead

* Community should announce received activities to followers
2021-08-19 17:24:33 -04:00
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.
2021-08-19 20:54:15 +00:00
Dessalines
6af75492a9
Swap out iframely (#1706)
* Replace Iframely. Fixes #1681

* Add post_link_tags to nginx

* Adding post_link_tags route

* Cleaning up post_link_tags

* Changing PostLink to SiteMetadata, adding it to the API.

* Fixing issue when local has no openssl certs.

* Fixing an issue with pictrs errors

* Revert "Fixing issue when local has no openssl certs."

This reverts commit dbf7d1b1ee03846e5ef7b7156e618424f1150e1d.

* Add ca-certs to dockerfile for volume mount.

* Cleaning up fetch_pictrs request

* Changing to fetch_site_data
2021-08-19 14:12:49 +00:00
8158966af6
Merge pull request #1710 from LemmyNet/mod_transfer_community
Adding ModTransferCommunity to modlog in API. Fixes #1437
2021-08-18 22:01:09 +00:00
6910e18a83 Adding ModTransferCommunity to modlog in API. Fixes #1437 2021-08-17 17:52:28 -04:00
1f64db6a33 Upgrading deps 2021-08-17 16:31:16 -04:00
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
2021-08-17 14:04:58 -04:00
Dessalines
8a1af056e2
When banning a user, remove communities they've created (#1700)
- Fixes #1659
2021-08-13 17:39:56 +00:00
353a1fe0a0
Rewrite activitypub following, person, community, pm (#1692)
* Rewrite following activities

* Rewrite person apub

* Rewrite community apub

* Rewrite private message activity sending
2021-08-12 08:48:09 -04:00
a44b5c9c36 publish to crates.io with normal release script 2021-08-09 18:44:18 +02:00
af6aa3c0bf Distribute Lemmy via crates.io 2021-08-09 17:29:32 +02:00
Dessalines
7b8cbbba85
Simplify config using macros (#1686)
Co-authored-by: Felix Ableitner <me@nutomic.com>
2021-08-04 21:13:51 +00:00
b8d7f00d58
Rewrite voting (#1685)
* Merge like/dislike activity handlers into vote

* Rewrite vote sending code

* Remove old send_create, send_update functions
2021-08-02 16:33:40 -04:00
Dessalines
1664cb326a
Merge pull request #1677 from LemmyNet/remove-fat-deps
Remove brotli, zstd dependencies
2021-08-02 16:21:33 -04:00
abd26aeab2 Remove brotli, zstd dependencies 2021-08-02 14:05:39 +02:00
dc363c8f35 Merge logic for post create and update 2021-07-31 19:26:17 +02:00
ff265c7ebc Rewrite apub post (de)serialization using structs (ref #1657) 2021-07-30 23:16:32 +02:00
Dessalines
d85f0d087e
Blank out extra info for deleted or removed content. Fixes #1679 (#1680) 2021-07-30 18:44:15 +00:00
Dessalines
fcae2189eb
Add show_new_posts_notifs setting. Fixes #1664 (#1665) 2021-07-22 20:07:40 +00:00
Dessalines
5fe7de2bff
Adding shortname fetching for users and communities. Fixes #1662 (#1663) 2021-07-20 04:29:50 +00:00
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
2021-07-06 13:26:46 +00:00
Dessalines
f54209c451
Running clippy --fix (#1647) 2021-07-05 16:07:26 +00:00
880c51687a Merge branch 'main' into feature/mark_post_as_read 2021-04-26 10:44:19 -04:00
6d3778cafe Changing unwrap_default to unwrap_or(false) 2021-04-26 09:50:34 -04:00
5b2be6f9df Add show_read_posts filter. Fixes #1561 2021-04-24 18:26:50 -04:00
ed31deab00 Creator extra search results 2021-04-23 11:54:38 -04:00
51e181c529 Don't search for communities or users when the id is included. 2021-04-23 02:30:13 -04:00
f8cd6fd445 Making more fields optional in the API.
- Fixes #1569
2021-04-23 02:30:13 -04:00
c86f5472fb Adding listing_type to search. 2021-04-23 02:13:32 -04:00
a42ac3e58a Add creator id to search. Fixes #765 2021-04-23 02:12:29 -04:00
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>
2021-04-21 17:41:14 -04:00
65a11a7239
Use .map_err in api code (fixes #1573) (#1575)
* Use .map_err in api code (fixes #1573)

* forgot some
2021-04-16 09:10:43 -04:00
aa79c5131f
Implement federated bans (fixes #1298) (#1553)
* Implement federated bans (fixes #1298)

* mod actions should always be federated to affected user, in addition to followers

* Make Undo/Block work for remote mods

* clippy fix

* fix federation test

* vscodium doesnt auto-save changes...
2021-04-09 11:01:26 -04:00
Dessalines
c3d64f996e
Removing community.creator column. Fixes #1504 (#1541)
* Removing community.creator column. Fixes #1504

* Fixing unit tests.

* Fixing federation tests.
2021-04-08 11:29:08 +00:00
Dessalines
5fff927dc4
Adding matrix id validation check. Fixes #1520 (#1538) 2021-04-07 11:38:00 +00:00
d97129e7ae Merge branch 'main' into change_password_api 2021-04-06 12:09:26 -04:00
bcdbced0dd
Merge pull request #1536 from LemmyNet/change_preferred_to_display_name
Changing preferred to display name. Fixes #1211
2021-04-06 12:02:50 +00:00
98216d8a3b
Merge pull request #1535 from LemmyNet/rust_captcha_features
Rust captcha features
2021-04-06 11:58:48 +00:00
f33f763278 Moving ChangePassword to its own API action. Fixes #1471 2021-04-01 17:39:01 -04:00
bf7558830f Changing preferred to display name. Fixes #1211 2021-04-01 13:57:45 -04:00
1ba570092e Adding more rust captcha features. Fixes #1248 2021-04-01 13:30:24 -04:00
2f63fdbde0 Adding a setting to show / hide scores. Fixes #1503 2021-03-31 06:54:46 -04:00
4c8f2e976e Merge remote-tracking branch 'yerba/split-api-crate' into test_merge_api_crates_reorg 2021-03-29 16:24:50 -04:00
01fc1228d5 Fix API and clippy warnings 2021-03-29 20:55:08 +02:00
2309088b03 Renaming to api/v3 2021-03-29 11:26:15 -04:00
249fcc5066 Split api crate into api_structs and api 2021-03-25 20:19:40 +01:00
3ca2453fc6 Merge branch 'main' into move_matrix_and_admin_to_person 2021-03-24 11:51:34 -04:00
8a10a9079f Merge remote-tracking branch 'yerba/federated-moderation' 2021-03-24 11:48:02 -04:00
baab2e88a5 Merge branch 'main' into move_matrix_and_admin_to_person 2021-03-23 14:16:54 -04:00
b4276341af Adding saved_only to GetComments and GetPosts. Fixes #1513 2021-03-22 10:39:54 -04:00
eb45bf2d0a Moving admin to person table. Fixes #1515 2021-03-22 10:28:00 -04:00
c884510173 Creating default DB forms. Fixes #1511 2021-03-20 16:59:07 -04:00
1745b64ceb Moving matrix_user_id to person table. #1438 2021-03-20 15:21:51 -04:00
4f54108a9c Merge branch 'main' into federated-moderation 2021-03-19 17:11:34 +01:00
493598c1ba A few suggestion fixes. 2021-03-19 10:02:58 -04:00
05b485b678 Merge branch 'Mart-Bogdan-1462-jwt-revocation-on-pwd-change' into jwt_revocation_dess 2021-03-19 00:31:49 -04:00
c3efb9f7cf Strictly typing DB id fields. Fixes #1498 2021-03-18 16:25:21 -04:00
99e5a4d1c3 Moving send email check inside function. 2021-03-18 10:52:25 -04:00
b3a5b4eb82 Refactor activitypub code 2021-03-17 18:12:37 +01:00
270ce539bf Removing some TODOS. 2021-03-15 18:18:50 -04:00
8ee624a542 Some changes
- Changing claim name to local_user_id to facilitate logout.
- Changing AddAdmin back to using person_id
2021-03-15 14:02:27 -04:00
Bogdan Mart
74272ed754 more correct tests 2021-03-13 22:36:40 +02:00
Bogdan Mart
4426c3176d fix timestamp condition #1462 2021-03-13 22:18:26 +02:00
Bogdan Mart
7b0a09e84e Merge remote-tracking branch 'origin/main' into 1462-jwt-revocation-on-pwd-change
* origin/main:
  revert Compose file version from 3.3 to 2.2
  Adding more mem limits
  bump memory limit of iframely
  Remove extra category_id s . Fixes #1429
  Fixing wrong user_ and community icon and banner urls.
  Remove category from activitypub context
  Adding a password length check to other API actions. (#1474)
  Update test script
  Use URL type in most outstanding struct fields (#1468)
  Forbid usage of unwrap
  Upgrade Rust version
  Rewrite settings implementation. Fixes #1270 (#1433)
  Rename `lemmy_structs` to `lemmy_api_structs`

# Conflicts:
#	crates/db_schema/src/source/user.rs
2021-03-13 20:19:55 +02:00
Bogdan Mart
ab947f1f08 User token revocation upon password change
Added DB column validator_time and chedking that is is less then token's "Issuead at time"
Wip on #1462
2021-03-13 20:16:35 +02:00
5998c83b2a Only sending private message if its a local user. 2021-03-12 15:18:03 -05:00
7c039340ed 2nd pass. JWT now uses local_user_id 2021-03-11 17:47:44 -05:00
b1ca85b910 Fix clippy warning 2021-03-11 18:18:01 +01:00
9cb4dad4b4 A first pass. 2021-03-10 23:43:11 -05:00
ddf4a667b1 ~80% done 2021-03-10 17:33:55 -05:00
3ffae1f5b8 Allow adding remote users as community mods (ref #1061) 2021-03-09 18:14:15 +01:00
Dessalines
134fece36d
Adding a password length check to other API actions. (#1474)
* Adding a password length check to other API actions.

- Fixes #1473

* Fixing comment.
2021-03-02 10:36:10 -05:00
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
2021-03-02 12:41:48 +00:00
Dessalines
462c4a2954
Rewrite settings implementation. Fixes #1270 (#1433)
* A first attempt at using deser-hjson. Fixes #1270

* Trying to fix tests, try 1

* Trying to fix tests, try 2

* A few fixes to deser_hjson

- Removing unwrap_or_defaults, using impl functions.
- Reorganized settings

* Make clippy happy

* hjson list strings must be quoted.

* Adding support for env vars.

* Moving to structs and defaults file.

* Moving settings default and struct.
2021-03-01 17:24:11 +00:00
3bdd78f341 Rename lemmy_structs to lemmy_api_structs 2021-03-01 14:08:41 +01:00
a869a2823b Still continuing on.... 2021-02-26 08:49:58 -05:00
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.
2021-02-25 15:44:30 -05:00
3141ad31de Remove categories (fixes #1429) 2021-02-25 13:22:37 +01:00
8096765f0e Fix clippy error upper_case_acronyms 2021-02-22 19:04:32 +01:00
bcc8dae16b Fixing deploy version. 2021-02-19 13:05:42 -05:00
a806493bc2 Version 0.9.8 2021-02-19 11:38:24 -05:00
3d400ca21d Hide followed communities, except for own user (fixes #1303) 2021-02-11 14:53:17 +01:00
acadf0289e Fixing reason lengths to char counts. 2021-02-10 10:36:22 -05:00
999d9f4d6c Move routes into separate crate to speed up compilation 2021-02-09 19:34:36 +01:00
5656db3e3d Version 0.9.7 2021-02-08 15:17:56 -05:00
f198f281cf Version 0.9.6 2021-02-05 13:01:29 -05:00
4864f80656 Fixing community search not using auth. Fixes #1411 2021-02-05 10:36:28 -05:00
8a7e50381f Version 0.9.5 2021-02-04 22:48:21 -05:00
nutomic
1a4e35eb50 Store activitypub endpoints in database (#162)
Address review comments

Store Activitypub urls in database (fixes #808)

Co-authored-by: Felix Ableitner <me@nutomic.com>
Reviewed-on: https://yerbamate.ml/LemmyNet/lemmy/pulls/162
Co-Authored-By: nutomic <nutomic@noreply.yerbamate.ml>
Co-Committed-By: nutomic <nutomic@noreply.yerbamate.ml>
2021-02-04 16:34:58 +00:00
9415bec557 Version 0.9.4 2021-02-02 15:29:38 -05:00
1857f02af8 Moving back tokio and reqwest. 2021-02-01 21:54:23 -05:00
10f0b3b877 Trying to upgrade lemmys deps. 2021-02-01 15:56:37 -05:00
Dessalines
0be9b5bddb
Add allowed and blocked instances to the federated_instances response. (#1398)
- Fixes #1315
2021-02-01 13:11:37 -05:00
c8254dc0a8
Merge pull request #1399 from LemmyNet/dont_let_banned_users_follow
Make sure banned users cant subscribe, and the ban unsubs them. Fixes…
2021-02-01 12:19:41 +00:00
cd08fdf76f Make sure banned users cant subscribe, and the ban unsubs them. Fixes #1324 2021-01-30 23:55:14 -05:00
aecb2411d8 Add check for parent comment. Fixes #1390 2021-01-30 23:10:16 -05:00
3a05817b41 Version 0.9.3 2021-01-29 14:25:20 -05:00
2322534648 Version 0.9.2 2021-01-29 13:49:43 -05:00
e6a16f08a3 Version 0.9.1 2021-01-29 11:43:16 -05:00
3d578f9df2
Use Url type for ap_id fields in database (fixes #1364) (#1371) 2021-01-27 11:42:23 -05:00
Dessalines
cf911c023d
Add listing type to list communities (#1380)
* Adding listing type to ListCommunities. Fixes #1379

* Upgrading lemmy-js-client.
2021-01-26 12:18:01 -05:00
1addbe361a Version 0.9.0 2021-01-24 22:43:52 -05:00
Dessalines
97617d699d
Docker manifest arm amd64 deploy (#1367)
* A first try at docker manifest. 1.

* Fixing api version location

* Version 0.9.0-rc.13

* Test docker.

* Test docker 2.

* Test docker 3.

* Test docker 4.

* Test docker 5.

* Test docker 6.

* Test docker 7.

* Test docker 8.

* Test docker 9.

* Test docker 10.

* Test docker 11.

* Test docker 12.

* Version 0.9.0-rc.14

* Test docker 13.

* Test docker 14.

* Version 0.9.0-rc.15

* Test docker 15.

* Version 0.9.0-rc.16

* Test docker 16.

* Version 0.9.0-rc.17
2021-01-24 22:44:35 -05:00
3b64c58198 Move most code into crates/ subfolder 2021-01-20 16:21:27 +01:00