Commit Graph

72 Commits

Author SHA1 Message Date
Felix Ableitner
cf214ff583 Move jwt secret from config to database (fixes #1728) 2021-09-27 11:25:09 +02: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
6910e18a83 Adding ModTransferCommunity to modlog in API. Fixes #1437 2021-08-17 17:52:28 -04:00
Dessalines
6fbf6a684c
Make sure bots aren't included in aggregate counts (#1705)
- Fixes #1648
2021-08-16 20:52:24 +00:00
Dessalines
896ba8451c Some comment count fixes.
- Make sure an update to deleted decreases the count. Fixes #1676
- Don't allow the post creator to comment necro-bump their own post.
  Fixes #1675
2021-08-01 21:07:45 -04:00
Dessalines
6ffa291ec9
Actor name length config dess (#1672)
* Make length of user/community name configurable (fixes #1306)

* use single config value, fix migrations, increase displayname length

* remove debug statements

* add helper method for setting actor_name_max_length

* move function

* Fixing some defaults

Co-authored-by: Felix Ableitner <me@nutomic.com>
2021-07-22 21:53:44 -04:00
Dessalines
fcae2189eb
Add show_new_posts_notifs setting. Fixes #1664 (#1665) 2021-07-22 20:07:40 +00:00
Dessalines
5b2be6f9df Add show_read_posts filter. Fixes #1561 2021-04-24 18:26:50 -04:00
Nutomic
db1abff857
Add option to limit community creation to admins only (fixes #1586) (#1587)
* Add option to limit community creation to admins only (fixes #1586)

* address review
2021-04-22 19:42:58 -04:00
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>
2021-04-21 17:41:14 -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
7bd474a843
Adding a short site description. Fixes #1496 (#1532)
* Adding a short site description. Fixes #1496

- Renaming old description to sidebar

* Adding a back end site desc length check.
2021-04-07 11:40:35 +00:00
Nutomic
a4c2421e74
Merge pull request #1537 from LemmyNet/add_users_active_monthly_community_sort
Adding users active monthly for community sort. Fixes #1527
2021-04-06 12:03:11 +00:00
Nutomic
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
Dessalines
b893085d1f Adding users active monthly for community sort. Fixes #1527 2021-04-01 14:34:27 -04:00
Dessalines
bf7558830f Changing preferred to display name. Fixes #1211 2021-04-01 13:57:45 -04:00
Dessalines
2f63fdbde0 Adding a setting to show / hide scores. Fixes #1503 2021-03-31 06:54:46 -04:00
Dessalines
eb45bf2d0a Moving admin to person table. Fixes #1515 2021-03-22 10:28:00 -04:00
Dessalines
53ea383b4e Forgot to regenerate person_alias views 2021-03-20 16:32:52 -04:00
Dessalines
1745b64ceb Moving matrix_user_id to person table. #1438 2021-03-20 15:21:51 -04:00
Dessalines
05b485b678 Merge branch 'Mart-Bogdan-1462-jwt-revocation-on-pwd-change' into jwt_revocation_dess 2021-03-19 00:31:49 -04: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
Dessalines
ddf4a667b1 ~80% done 2021-03-10 17:33:55 -05:00
Dessalines
817b4ff08e Fixing wrong user_ and community icon and banner urls.
- Fixes #1477
2021-03-03 23:40:00 -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
efc9047f87 Done with user->person migrations, now to code. 2021-02-25 14:04:12 -05:00
Dessalines
aba32917bd Merge branch 'main' into split_user_table 2021-02-25 12:34:00 -05:00
Felix Ableitner
72783edb17 In remove categories down migration, add default for category 2021-02-25 16:16:02 +01:00
Felix Ableitner
3141ad31de Remove categories (fixes #1429) 2021-02-25 13:22:37 +01:00
Dessalines
8088055d38
Fix aggregates time columns 2 (#1427)
* Adding a new comment sort. Fixes #1294

* Fixing a migration comment.

* Adding a comment for newest_comment_time_necro

* Make sure federated items set correct aggregates fields in trigger.

- Fixes #1402
2021-02-18 10:53:04 -05:00
Dessalines
0c4b57a6d0
Adding a new comment sort for posts. Fixes #1294 (#1425)
* Adding a new comment sort. Fixes #1294

* Fixing a migration comment.

* Adding a comment for newest_comment_time_necro
2021-02-18 10:38:25 -05:00
Dessalines
a183815870 Adding a few more tables. 2021-02-15 14:34:10 -05:00
Dessalines
d0bd02eea0 Starting on user_ to person migration. 2021-02-14 13:46:16 -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
Dessalines
6bb4f0b41f
Adding forum sort for post_aggregates. Fixes #1312 (#1400)
* Adding forum sort for post_aggregates. Fixes #1312

* Changing sort name from forum to MostComments.
2021-02-01 11:53:44 -05:00
Dessalines
0fd0279543
Adding some recurring lemmy tasks. (#1386)
* Adding some recurring lemmy tasks.

- Add active users by day, week, month, and half year to site and
  community. Fixes #1195
- Periodically re-index the aggregates tables that use hot_rank.
  Fixes #1384
- Clear out old activities (> 6 months). Fixes #1133

* Some cleanup, recalculating actives every hour.
2021-01-29 11:38:27 -05:00
Nutomic
3d578f9df2
Use Url type for ap_id fields in database (fixes #1364) (#1371) 2021-01-27 11:42:23 -05:00
Dessalines
8f61a148f6 Fixing comment count necro-bump issue. 2021-01-15 11:58:56 -05:00
Dessalines
4fdcb57753 Report only local counts in site_view.
- Move open_registrations under top level.
- Fixes #1340
2021-01-14 15:22:07 -05:00
Dessalines
7a97fc370b Adding stickied to post_aggregates.
- Added more indexes to account for sorting by stickied first.
- Changed all order bys in the diesel views to use post_aggregates.
2021-01-07 16:22:17 -05:00
Dessalines
d227000de3 Halfway done with hot rank indexes. 2021-01-05 23:42:48 -05:00
Dessalines
a27b7f8d1f Fix site aggs. 2020-12-20 00:09:20 -05:00
Dessalines
2d7d9cf7d8 Some API cleanup, adding site_id to site aggregates. 2020-12-19 20:10:47 -05:00
Dessalines
6d96f105c6 Dropping the unecessary views and table triggers. 2020-12-17 15:29:10 -05:00
Dessalines
4f5e51beb5 Removing fast tables and old views. 2020-12-16 22:42:25 -05:00
Dessalines
e4714627a4 Beginning to add new comment_view. 2020-12-15 10:28:25 -05:00
Dessalines
bdd264cd5e Adding tests for post aggregates. 2020-12-11 13:07:27 -05:00
Dessalines
eef93440d0 Starting to add post_view. 2020-12-10 15:53:49 -05:00
Dessalines
dabcfca67b Adding tests for current aggregates. 2020-12-09 11:52:10 -05:00