Commit graph

5456 commits

Author SHA1 Message Date
Felix Ableitner
60b5bf5c0e Version 1.0.0-alpha.7 2025-09-01 10:17:00 +02:00
dullbananas
b58269c57a
Fix missing interactions_month update and missing "AS community_id", and improve scheduled_tasks test (#5928)
* Fix missing interactions_month update and missing "AS community_id", and improve scheduled_tasks test

* make see eye run again

---------

Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
2025-08-21 13:15:56 -04:00
Dessalines
0a4e2fb26e
Adding requested Opengraph width and height metadata. (#5927)
* Adding requested Opengraph width and height metadata.

- Fixes #5920

* Using u16 to match pictrs width and height.
2025-08-20 14:03:06 -04:00
Dessalines
16aab76c5a
Fix API tests (#5934)
* api test fix 1

* Only test post.

* Try cloning the data.

* Only test post

* Rest of API tests.

* Removing unecessary post id.

* Revert "Try cloning the data."

This reverts commit 7f3d67b1f0.

* Comment plugin hook before.

* Remove another before

* Rest of api tests

* Fix user spec.

* Revert "Fix user spec."

This reverts commit 1a0bf39916.

* Using localuserview for admin check

* Fixing site_view import

* Try to add back in plugin hooks

* Commenting again, adding lints.

* Adding back tests.

* Forgot one

* Fixing shear.
2025-08-20 11:21:00 -04:00
Dessalines
29254b1e45
Move cargo build first in CI (#5933)
* Trying to fix cargo test ci 1.

* 2

* 3

* 3

* Print output

* Try empty restrict key

* Try empty

* Updating from main.

* Use cargo nextest, change CI order to build, test, clippy.

* Dont run clippy for all targets.

* Forgot run

* Forgot another.

* Remove nextest.

* Fixing perm
2025-08-20 05:01:22 +08:00
Dessalines
66a8095d4e
Fixing cargo test failures due to backported pg_dump security issue. (#5932)
* Trying to fix cargo test ci 1.

* 2

* 3

* 3

* Print output

* Try empty restrict key

* Try empty

* Updating from main.
2025-08-19 01:35:12 +08:00
Dessalines
b2eb9759a6 Version 1.0.0-alpha.6 2025-08-14 10:28:13 -04:00
Dessalines
644a448aa9
[main] Fixing active counts slow queries. (#5907) (#5917)
* [0.19] Fixing active counts slow queries. (#5907)

* Fixing active counts slow queries.

* Simplify back to str tuple

* Batch site and community updates

* Using update from temp table

* Making aggs temp table use interval name.

* Make dev setup use optimized postgres.

* Addressing PR comments.

* Use ref

* Removing system custom info from customPostgresql.conf

* Forgot to remove old scheduled tasks.

* Making sure migrations aren't missing anything from release/v0.19

Checked using git diff --diff-filter D --stat release/v0.19 migrations

* Rename all migrations to come after release/v0.19 migrations

* Add liked_at is not null check.
2025-08-09 21:57:38 +02:00
Dessalines
85cb47a464
Fixing administration typo (#5921) 2025-08-07 02:39:37 +08:00
Dessalines
9aadf45f52
Updating to newer git cliff. (#5912) 2025-08-01 21:49:38 +02:00
renovate[bot]
bc78797f46
Update Rust crate diesel to v2.2.12 (#5915)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-01 08:40:15 -04:00
renovate[bot]
f8ca6ff088
Update Rust crate clap to v4.5.42 (#5914)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-01 00:13:13 -04:00
dullbananas
aa125bdd9d
Add update_schema_file.sh (#5908)
* Add update_schema_file.sh

* Bush formatting
2025-07-30 13:59:40 -04:00
Nutomic
3dacf7e2be
Merge different AlreadyExists errors (fixes #5897) (#5900)
* Merge different `AlreadyExists` errors (fixes #5897)

* rename email errors

* Merge CouldntCreate and CouldntUpdate errors
2025-07-30 11:39:23 -04:00
Dessalines
5dcf69f0b5
Adding a local_site and local_user setting for default fetch limit (#5887)
* Adding a local_site and local_user setting for default fetch limit

- Currently only used for list_posts and list_comments, like the other
defaults.
- Fixes #5474

* Addressing PR comments.
2025-07-29 10:31:26 -04:00
Nutomic
d2079e44c5
Use case insensitive sort for followed communities (fixes #5903) (#5904) 2025-07-29 10:27:41 -04:00
Dessalines
f1ba2a2dbf
Add ability to block all users of an instance. (#5784)
* Fixing a few optionals.

* Fixing note.

* Starting to work on instance user blocking.

* Finishing up user instance blocking

* SQL fmt

* fmt.

* Fixing search_combined

* Fixing API tests.

* Fixing api-common imports.

* Fixing merge issues.

* Update crates/api/api_utils/src/utils.rs

Co-authored-by: Nutomic <me@nutomic.com>

* Making clearer alias names

* Submodules

* Submodules 2

* Format

* Remove api misc.

* Upgrading lemmy js client, fixing merge

* Prettier

* Fixing merge.

* Addressing PR comment.

* Fix some stack overflows.

* Fixing api tests.

* Fixing notification joins.

* Adding alias.

* Fixing api test files.

* Remove some tmp files.

* Change back to localhost.

* Remove instance_person and instance_communities actions from views.

These are only used for internal filtering, blocks and bans anyway.

* Removing a few unused joins.

* Fix API tests.

* Some lints.

* Updating js-client

* Try fixing test.

* Update crates/db_views/site/src/api.rs

Co-authored-by: dullbananas <dull.bananas0@gmail.com>

* Fixing blocked_instances save_user_settings.

---------

Co-authored-by: Nutomic <me@nutomic.com>
Co-authored-by: dullbananas <dull.bananas0@gmail.com>
2025-07-29 09:52:37 +02:00
dullbananas
df76935fa7
Refactor pagination cursor parsing (#5899) 2025-07-29 09:51:27 +02:00
Nutomic
1ff2aec3c7
Properly parse icons federated from Peertube (fixes #5894) (#5895) 2025-07-28 11:03:47 -04:00
Nutomic
398237b02a
Rename modlog items (#5882)
* Rename modlog items

* wip: update schema

* update code

* move
2025-07-28 10:17:17 +02:00
SleeplessOne1917
c8ac7e02d5
Re-export UpdateCommunityNotifications (#5891)
* Re-export UpdateCommunityNotifications

* Re-export UpdateCommunityTag
2025-07-27 21:08:23 -04:00
SleeplessOne1917
d04fa8f1e5
Re-export some types from lemmy-api-common (#5889)
* Re-export multi community types

* Re-export settings/data backup types

* Re-export post notification types

* Remove old unused notification struct

* Fix clippy error
2025-07-27 15:05:14 -04:00
dullbananas
eae7f1ba02
Speed up init in start_dev_db.sh using no-sync option (#5888) 2025-07-26 20:13:54 -04:00
Nutomic
88160dc86f
Refactor email (#5877)
* Reorder email files

* single email function with data enum

* refactor

* rename

* use spawn to send emails in background

* use ref

* single db insert

* move methods

* fix tests

* fix test

* remove unnecessary param
2025-07-25 09:00:28 -04:00
Nutomic
8a93ee1473
Only use MiMalloc on x86_64 target arch (fixes #5695) (#5885) 2025-07-24 10:51:44 -04:00
Nutomic
bf2e9beae9
Purge user images in background task (fixes #4642) (#5883) 2025-07-24 10:39:10 -04:00
Nutomic
7dfd5ef9e7
Finish adding post tags (#5869)
* add incoming tags federation

* submit activity update on tags change

* community tag federation test

* tag federation tests

* lint

* sql

* remove logs

* add index name, some comments

* fix comments

* clippy

* rename tags for posts

* fix tests

* wip

* cleanup

* simplify Tag::update_many

* separate name, display_name

* update apub examples

* objects have no displayname so remove it again

* add http endpoint

* clippy

* api tests

* federated api test

* simplify comments

* remove old files

* remote mod

* reorder

* change join

* update tags api

* add missing checks for multi-comm

* allow remote mods to edit tags

* helper function

* max tags count

* add description, background_color

* shear

* add mod update post endpoint

* move db read

* handle conflict

* federate as `CommunityPostTag`

* clippy

* remove background color, add display name

* add comments

* working federation

* test fix

* more fix

* fix api tests

---------

Co-authored-by: phiresky <phireskyde+git@gmail.com>
2025-07-24 07:57:01 -04:00
dullbananas
04cbabf6f7
Fix comment depth test (#5878) 2025-07-23 17:51:51 -04:00
Dessalines
a5b0475436
Fast history no background (#5873)
* Finishing up post and comment actions

* Adding community_actions.

* instance and person actions

* Fixing person_actions.

* Fixing down migrations

* Adding person_content_combined.

* Search combined.

* Aggregates tables.

* Dont rename old tables

* Fixing some constraints.

* Convert bigints to ints

* Forgot a bigint.

* Rest of i64 -> i32

* Adding actions id columns.

* Fixing connection config.

* Formatting smoosh up.sql

* Use current_date instead of now

* Adding history tables for liked_combined

* Upping wal size

* Fix clippy

* Fixing clippy.

* Fixing i64

* Getting rid of let mut conn

* Adding the history status table.

* Adding published indexes to speed up history.

* Adding comment like history scanning.

* Fixing schema options setup.

* post_read history

* person_post_aggregates / read_comments history

* post_like history

* Fixing conflicts.

* Fixing clippy.

* Use constant batch_size.

* person content combined post and comment history.

* Fixing id scanning.

* post/comment_actions -> saved_combined history

* search history

* Post and comment aggregates -> post / comment history.

* Uncommenting full history building.

* Changing DB_BATCH_SIZE to i64

* Fixing clippy.

* Fix index names.

* Fixing diff check by removing indexes.

* Adding the uplete ignore actions::id columns.

* Fixing merge imports.

* Fixing submodule update

* Try trigger disabling.

* Fix clippy

* Remove history table, do faster bulk inserts. Smoosh first.

Comments about how this fast insert is done is within smoosh comments.

* Adding some timings.

* Fast person content combined history

* Adding search_combined

* Fix person saved combined unique names

* person_liked_combined

* Remove-aggregates

* Fixing up.sql issues

* Re-building schema.rs

* Fixing down migrations.

* Removing history updating.

* Format sql.

* Move postgres logging to customPostgresql.conf

* Try using postgres 16-alpine in CI

* Speeding up add_report_count.

* speed up inbox_combined

* Speeding up remove_post_sort_type_enums

* Fixing post_sort_type

* Speeding up person votes

* Fixing wrong conn.

* Fixing broken migrations

* Remove comment.

* Make sure to re-index table after re-enabling indexes.

* Removing id columns from actions tables.

* Fixing down migrations.

* Using create table as for smoosh migration

* create_table as for person_content_combined.

* Fixing person_content_combined uniques

* create table as for search_combined

* create table as for liked_combined

* create table as for inbox_combined.

* Fixing a few score types.

* Fixing id positions.
2025-07-23 17:43:23 -04:00
dullbananas
b3e5e6c76a
Prevent stack overflow when fetching nested comment (#5787)
* attempt future wrapper

* Revert "attempt future wrapper"

This reverts commit ce95422228.

* use spawn

* remove `lazy` and change comment

* temporary change for test

* change 5000 back to 50

* fix comment about async laziness
2025-07-22 15:37:50 -04:00
Nutomic
6e292141cc
Allow remote groups to follow Lemmy communities (fixes #5354) (#5864)
* Allow remote groups to follow Lemmy communities (fixes #5354)

* index

* rename columns

* review changes

* primary key
2025-07-22 15:37:15 -04:00
Nutomic
40c89f99ca
Fix foreign key indexes migration (#5875) 2025-07-21 11:02:51 -04:00
dullbananas
de7d6ef148
Require indexes for all foreign keys (#5872)
* add test

* add migration with missing indexes
2025-07-21 09:56:58 +02:00
Nutomic
f65875c27a
Remove unused items (#5870)
* Remove some unused functions

* shear

* remove more

* full feature

* remove more

* some more

* mroe
2025-07-18 10:21:43 -04:00
Nutomic
72d254b4db
Notifications rewrite and post following (fixes #3069) (#5604)
* Add post_actions.disable_notifications (fixes #3042)

* Split up logic for send_local_notifs()

* refactor

* fmt

* add api endpoint, check

* dont call send_local_notifs from comment delete/remove

* move scrape_text_for_mentions() inside send_local_notifs()

* nullable

* simplify

* handle parent notification first

* cleanup

* remove `CommentResponse.recipient_ids`

* post notifications enum

* Follow posts (fixes #3069)

* use references

* cleanup

* new file

* db migration to merge mention, reply tables

* code adjustments

* adjust test code

* adjust enum case

* wip: get rid of inbox_combined table

* add table local_user_notification

* tests compiling

* get rid of inbox_combined, only use notification table

* rename view

* notify private messages

* clippy

* copy existing data

* wip: tests

* move tests

* clippy

* notify post subscribers

* community subscribe

* test fixes

* migration fix

* rename routes

* separate struct for api

* rename api params

* merge migrations

* separate notification modes for post/community

* fix

* down migration copy data

* test fix

* update api tests

* only single notification table

* clippy

* use local user id for recipient

* fix comments

* rename table

* recipient local user

* add indices

* keep local user id

* renames and cleanup

* NotificationDataType

* change notification response

* fix api tests

* test fix

* remove private_message.read

* fixes

* test fix

* fix
2025-07-17 19:04:09 -04:00
Dessalines
31dd9719b0
Fixing username-instance duplicate migration. (#5867)
Context: #5045 , #5858
2025-07-17 09:32:54 +02:00
Nutomic
cbc8f703b7
Extism release version (#5865) 2025-07-15 09:53:24 -04:00
Nutomic
2705728dbf
Delete report views, add missing report fields (#5863)
* Delete report views

* cleanup

* Add missing report fields

* simplify report trait

* simplify sized traits

* remove unnecessary traits with only one impl

* fix
2025-07-15 04:58:38 -04:00
Nutomic
cf0e021129
Add unique constraint for person(name, instance) (fixes #5045) (#5858)
* Add unique constraint for person(name, instance) (fixes #5045)

* fix

* not local

Co-authored-by: dullbananas <dull.bananas0@gmail.com>

---------

Co-authored-by: dullbananas <dull.bananas0@gmail.com>
2025-07-14 17:14:05 -04:00
dullbananas
21c1784a01
Use a new separate crate for uplete (#5848)
* replace lemmy_db_schema::utils::uplete with in-progress crate

* use published diesel-uplete crate

* remove unused tuplex dependency

* move diesel-uplete to dev-dependencies for lemmy_db_views_post

* import table modules in table_impls.rs

* update to new diesel-uplete with renamed stuff
2025-07-14 16:37:11 -04:00
Dessalines
fe30f30c4e
Don't export inbox combined view internal. (#5860)
Noticed this in the js-client. It's only used internally.
2025-07-11 17:15:59 -04:00
Nutomic
b5dee35b84
Update extism (#5859) 2025-07-11 16:52:53 -04:00
dullbananas
df4a79f4b6
Allow running all migrations with minimal dependencies (#5841)
* move schema_setup to separate crate

* remove lemmy_utils dependency

* add db_schema_setup/src/main.rs

* fix diesel.toml

* run diesel print-schema

* fix replaceable_schema paths

* remove unneeded dependencies

* taplo format

* fix duplicated cfg(test) attribute

* move replaceable_schema to crates/db_schema_setup/replaceable_schema

* warn if lemmy_db_schema_setup can be used instead of lemmy_server
2025-07-11 09:36:42 +02:00
Nutomic
a8a407ca6d
Federation refactoring (#5855)
* refactor federation http responses

* Rename Activity

* test fixes

* library release
2025-07-10 23:31:33 -04:00
Nutomic
7fb11c36fa
Fix comment depth off by one (#5851)
* Fix comment depth off by one

* fix

* test and comment
2025-07-10 23:28:06 -04:00
SleeplessOne1917
fd1e0b01e5
Add missing TS derives that were causing errors when generating Typescript bindings (#5853) 2025-07-09 09:48:14 +02:00
SleeplessOne1917
e66d0a3d61
Add creator_banned to VoteView (#5849) 2025-07-08 09:55:34 +02:00
Nutomic
8cf14f407f
Move local site user count updates to scheduled task (#5822)
* Move local site stats updates to scheduled task (fixes #5816, fixes #3213)

* only user count via scheduled task

* join to local site
2025-07-04 09:31:13 +02:00
Nutomic
3922f0f325
Revert " Add post_actions.disable_notifications (fixes #3042) (#5826)" (#5843)
This reverts commit 76fbb29079.
2025-07-02 11:29:42 +02:00
Nutomic
0d149dd613
Add missing comment depth check (#5840) 2025-07-02 09:37:20 +02:00