Commit Graph

5561 Commits

Author SHA1 Message Date
Dessalines 5cb3e222c3 Upgrading pg_format to 5.8 (#6141) 2025-11-10 10:29:09 +01:00
Nutomic 7292ffa89b Change multi_community_user to system_account (#6133)
* Change `multi_community_user` to `system_account`

* remove migration
2025-11-07 23:12:56 +08:00
Nutomic adcfe24ff8 Crate lemmy_diesel_utils (#6122)
* Upgrade to latest stable Rust (fixes #6006)

* rust 1.91

* clippy

* update deps

* format

* test fixes

* upgrade debian for api tests

* remove once_cell

* Rename schema_setup to diesel_utils

* move dburl

* move db connection code

* move utils

* move sensitive string

* move crud trait

* clippy

* shear

* update paths

* remove protobuf dep

* feature fixes

* features

* fmt
2025-11-07 18:21:31 +08:00
Dessalines 4e7a306acc Adding multi_communities_created to PersonDetails, and multi_community_follows to MyUserInfo (#6132)
* Adding multi_community_name to list_posts.

- This is necessary for front ends to not have to pre-fetch the
multi-community.id
- Works the same way as community_name.

* Upgrading to debian:sid to fix local docker issues.

* Adding multi_communities_created to PersonDetails, and followed to MyUserInfo.
2025-11-07 10:11:32 +01:00
Dessalines 6c062e50fc Adding a last_application_duration_seconds field to GetSite. (#6126)
* Adding a last_application_duration_seconds field to GetSite.

- This is the difference in seconds, between the most recent approved /
denied application, and its creation time.
- Will help in estimating your time until approval.
- Fixes #6125

* Remove chrono
2025-11-07 10:06:35 +01:00
Nutomic 2e543ca518 Add helper methods for resolve (#6130) 2025-11-06 23:17:58 +08:00
Nutomic 9ba98ba354 Add missing attribute optional_fields for ModlogView (#6129) 2025-11-06 23:16:07 +08:00
Nutomic 6d371171f0 Support api v3 (#6120)
* Support api v3 for basic browsing

* login, logout

* vote rendering

* voting

* add some params

* add search and resolve object

* cleanup

* clippy

* create comment

* create post

* simplify

* clippy

* api test

* cleanup
2025-11-06 18:01:44 +08:00
Dessalines da847af102 Adding multi_community_name to list_posts. (#6127)
- This is necessary for front ends to not have to pre-fetch the
multi-community.id
- Works the same way as community_name.
2025-11-06 10:03:09 +01:00
Felix Ableitner acf33396a5 Version 1.0.0-alpha.12 1.0.0-alpha.12 2025-11-05 11:10:01 +01:00
Dessalines b1b6593203 Fixing ModlogKind comment. (#6123) 2025-11-05 09:58:17 +01:00
Dessalines 8af0830749 Updating .rustfmt edition to 2024 (#6124) 2025-11-05 09:56:14 +01:00
Nutomic efb7116385 Upgrade to latest stable Rust (fixes #6006) (#6034)
* Upgrade to latest stable Rust (fixes #6006)

* rust 1.91

* clippy

* update deps

* format

* test fixes

* upgrade debian for api tests

* remove once_cell
2025-11-05 08:52:27 +08:00
renovate[bot] 8f9aae0e43 Update Rust crate cfg-if to v1.0.4 (#6118)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-01 12:04:45 +08:00
renovate[bot] 96c18d8331 Update Rust crate anyhow to v1.0.100 (#6117)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-01 11:57:59 +08:00
Nutomic 6566caabf2 Merge modlog tables (fixes #6012, fixes #6070) (#6054)
* update schema.rs

* Require indexes for all foreign keys (#5872)

* add test

* add migration with missing indexes

* Fix foreign key indexes migration (#5875)

* 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

* 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

* make columns nullable

* more shrinking

* update utils.sql

* update remove-aggregate-tables migration, and change indexed ranks back to non-null

* rename columns in remove-aggregate-tables migration, and fix later migrations

* remove comment

* optimize rank functions

* stuff

* more migration fixes

* other changes to migrations

* make schema setup tests pass

* stuff

* make tests pass

* crud trait is back

* add todo

* change immutable to stable

* use minutes for age

* clean up

* start cursor refactor

* finish cursor refactor

* remove "get_" prefix

* clean up

* import style consistency

* revert change to translations commit

* use i-love-jesus from crates.io

* remove some non_0_ and non_1_

* revert most changes in the crates folder

* fix column order in structs

* stuff

* fix migrations

* stuff (rust tests now pass)

* rename some vote-related fields

* fix some rust errors to make ts bindings generation work, and rename voteview field

* lint

* change stuff in api_tests to match changes to types

* change translations commit to prevent merge conflict

* rename "is_positive"

* remove like score range check test from post.spec.ts

* uncomment restrict-key thing

* prettier

* rerun ci

* add cfg_attr

* fix "A required parameter cannot follow an optional parameter"

* WIP: up migration

* reason optional

* remove triggers

* update check

* person_liked_combined: RENAME COLUMN liked_at TO voted_at

* for "newest comment" times: remove "after_published" prefix and don't convert to non-null

* move "voted_at" rename to "rename_timestamp_add_at" migration

* remove added uses of as_select

* fix sql code referencing "liked_at"

* clippy

* restore as_select uses that were already present

* change lemmy-js-client version

* db_schema changes

* rewrite db views modlog

* rewrite db views notifs

* add comment

* simplify modlog

* also simplify notifs

* fixes

* rename removed field

* fixes

* remaining code changes

* hide modlog names

* helper methods for modlog form

* update check

* wip

* include target person in modlog entries for remove post/comment

* remove target_id param for notify_mod_action

* tests compiling

* clippy

* migration fixes

* avoid foreign key references

* use modlog.is_revert

* partial test fix

* tests passing

* down migration

* fixes

* fixes #6070

* use rename sequence/constraint instead of rename table

* disable diff check for this migration

* clippy

* alt workaround

* fix

* test

* fixes

* use num_nonnulls

* remove wrong serde skip

---------

Co-authored-by: Dull Bananas <dull.bananas0@gmail.com>
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
2025-11-01 05:54:58 +08:00
Dessalines 5c10c76950 Remove special BanFromCommunityResponse in favor of PersonResponse. (#6113)
* Remove special BanFromCommunityResponse in favor of PersonResponse.

The site ban already returns PersonResponse now, this makes the
BanFromCommunityResponse consistent to that.

* Fixing shear.
2025-10-30 20:58:58 +01:00
Nutomic 809312d174 Remove some unused code (#6111) 2025-10-31 00:20:30 +08:00
Nutomic 9b814f9b03 Small compile speed optimizations (#6114)
* Remove unnecessary dependency

* no separate crate for federation state

* also move community person ban view

* fix
2025-10-31 00:12:52 +08:00
Dessalines a31573d013 Multi-community-feeds should be at /m/ , not /c/ (#6112) 2025-10-30 09:56:58 +01:00
Nutomic d2663ed91e Revert changes to crud trait (ref #5874) (#6108)
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
2025-10-27 21:48:09 +08:00
Nutomic deef01471b Retry tests in ci on failure (ref #5925) (#6107) 2025-10-27 21:13:58 +08:00
Nutomic 173519574f Handle plain identifiers in markdown (#6069) 2025-10-27 11:27:15 +01:00
Dessalines 71510d3074 Fixing a few issues with federation-view exports. (#6104) 2025-10-27 10:35:01 +01:00
Nutomic 8c2303a1e7 Setup default data for new instance (#6077)
* Setup default data for new instance

* embed community list in binary (fixes #2951)

* wip

* filter nsfw, suspicious

* fetch less after first start

* finish welcome post

* fix

* prefetch more comms

* run setup earlier, during initial user signup

* fix test

* clippy

* clippy

* fix api test

* move text to translations

* fetch data from lemmy.ml instead of lemmyverse.net

* adjust comment
2025-10-27 10:28:31 +01:00
Nutomic 873818a8cd Fix wrong federation error and simplify code (fixes #4363) (#6093)
* Simplify federation send code

* Fix wrong federation error (fixes #4363)
2025-10-27 10:02:37 +01:00
Dessalines 45df25fcb8 Remove space in platforms. (#6102)
* Remove space in platforms.

* Version 1.0.0-alpha.11
2025-10-24 10:00:55 +02:00
Nutomic dc6ee1c167 Implemente federated instances view (fixes #6063) (#6089)
* Implemente federated instances view (fixes #6063)

* add domain_filter, kind

* pagination

* fix

* review

* remove comment
2025-10-24 00:16:13 +08:00
Dessalines 0a199fa49d Add comment for is_upvote API fields. (#6096)
* Add comment for `is_upvote` API fields.

- Fixes #5936

* Adding comment for VoteView
2025-10-23 19:13:12 +08:00
Felix Ableitner 580a88bd89 Version 1.0.0-alpha.10 1.0.0-alpha.10 2025-10-23 12:48:43 +02:00
Nutomic e77128f45c Expire logins after one week by default, add param stay_logged_in (#6058)
* Expire logins after one week by default, add param `stay_logged_in` (fixes #5943)

* fix

* review
2025-10-23 08:22:48 +08:00
Nutomic 28e1592059 Create plugin hook for new notifications and reports (fixes #1027, fixes #5349) (#6085)
* Create plugin hook for new notifications and reports (fixes #1027)

* wip

* fmt

* fix build

* fix

* clippy

* fmt

* consistent naming for hooks

* update test plugin
2025-10-23 08:21:08 +08:00
Nutomic 057d43c99f Fix for NodeBB compat (#6090) 2025-10-23 07:52:52 +08:00
Dessalines 4eae94c583 Make sure creator_banned uses item_creator for ReportCombinedView (#6094)
- Fixes #6011
2025-10-21 09:58:14 +02:00
Nutomic ae530cfc17 Include caller information in error logs (#6088) 2025-10-21 01:06:58 +08:00
Dessalines e11b9695ff Make all the serde tagged types snake_case (#6092)
* Make all the serde tagged types snake_case

* Upgrading lemmy-js-client.
2025-10-20 10:41:03 +02:00
Dessalines dd034ba99e Adding read bool to mark_many_as_read API. (#6080)
* Adding read bool to mark_many_as_read API.

- Fixes #6079

* Using explicit person_id, post_ids in params.

* Fixing a few more.

* Fix clippy

* Removing import.

* Some adjustments for Post::mark_as_read (#6084)

* remove separate methods for mark as read

* remove unnecessary code

* fixes

---------

Co-authored-by: Nutomic <me@nutomic.com>
2025-10-17 10:00:13 +02:00
Nutomic f46a646fa4 Include id for CommunityHasNoFollowers (#6083)
* Include id for CommunityHasNoFollowers

* use ap_id

* clippy
2025-10-17 09:59:16 +02:00
dullbananas 64c75868e6 Shrink things that are rewritten in slow migrations (#5874)
* update schema.rs

* Require indexes for all foreign keys (#5872)

* add test

* add migration with missing indexes

* Fix foreign key indexes migration (#5875)

* 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

* 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

* make columns nullable

* more shrinking

* update utils.sql

* update remove-aggregate-tables migration, and change indexed ranks back to non-null

* rename columns in remove-aggregate-tables migration, and fix later migrations

* remove comment

* optimize rank functions

* stuff

* more migration fixes

* other changes to migrations

* make schema setup tests pass

* stuff

* make tests pass

* crud trait is back

* add todo

* change immutable to stable

* use minutes for age

* clean up

* start cursor refactor

* finish cursor refactor

* remove "get_" prefix

* clean up

* import style consistency

* revert change to translations commit

* use i-love-jesus from crates.io

* remove some non_0_ and non_1_

* revert most changes in the crates folder

* fix column order in structs

* stuff

* fix migrations

* stuff (rust tests now pass)

* rename some vote-related fields

* fix some rust errors to make ts bindings generation work, and rename voteview field

* lint

* change stuff in api_tests to match changes to types

* change translations commit to prevent merge conflict

* rename "is_positive"

* remove like score range check test from post.spec.ts

* uncomment restrict-key thing

* prettier

* rerun ci

* add cfg_attr

* fix "A required parameter cannot follow an optional parameter"

* person_liked_combined: RENAME COLUMN liked_at TO voted_at

* for "newest comment" times: remove "after_published" prefix and don't convert to non-null

* move "voted_at" rename to "rename_timestamp_add_at" migration

* remove added uses of as_select

* fix sql code referencing "liked_at"

* clippy

* restore as_select uses that were already present

* change lemmy-js-client version

---------

Co-authored-by: Nutomic <me@nutomic.com>
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
Co-authored-by: Dessalines <tyhou13@gmx.com>
2025-10-17 03:22:34 +08:00
Nutomic e882f8ca54 Auto-follow community when enabling notifications (fixes #6081) (#6082)
* Auto-follow community when enabling notifications (fixes #6081)

* clippy

* clippy
2025-10-16 23:57:03 +08:00
Nutomic ce890716ca Serialize enum variants in snake_case (fixes #6062) (#6067)
* Serialize enum variants in snake_case (fixes #6062)

* api tests

* more enums
2025-10-15 17:01:23 +08:00
Nutomic 025358613a Dont send duplicate notification in case of reply with mention (#6076) 2025-10-15 01:25:57 +08:00
Nutomic 4520e8ad8d Include keyword blocks and discussion languages in backup (fixes #5811) (#6074) 2025-10-15 01:16:45 +08:00
Nutomic ee46c0d2a1 Use proper title for replies and mentions in RSS feed (fixes #5357) (#6075) 2025-10-15 01:13:55 +08:00
Nutomic f8e4fa15b9 Private community fixes (#6003)
* API should return pending follows count for all private comms

* add test case

* wip

* wip

* wip 2

* more asserts

* wip 3

* wip 4

* separate crate

* wip

* rewrite

* shear

* add missing filter

* api common

* add filter

* add community follower state denied

* remove unnecessary filter

* filter denied

* use separate query

* clippy

* clippy

* review

* rename migration

* fix api tests
2025-10-14 18:17:34 +08:00
Nutomic 871018ea2a Add build.rs to update db migrations macro (fixes #6005) (#6061) 2025-10-13 11:41:45 +02:00
SleeplessOne1917 c4df41cb2b Re-export PersonResponse from lemmy-api-common (#6064) 2025-10-12 21:49:27 +08:00
Dessalines 7a22a7d0a6 Make sure create_multi_community_entry returns the community. (#6060)
* Make sure create_multi_community_entry returns the community.

Also did various cleanups:

- Extracted MultiCommunityEntry into its own type, form, and impl.
- Removed a lot of Oks and specified the lemmy error type.
- Removed a few unecessary joins.
- Cleaned up some calls.

* Fixing api tests.

* Fix test.

* Rename error codes

* Remove person join from read_community_ap_ids.
2025-10-11 00:13:23 +08:00
Nutomic a488ddf151 Allow users to view comments of deleted posts (fixes #6044) (#6057)
* Allow users to view comments of deleted posts (fixes #6044)

* remove deletes
2025-10-10 23:20:02 +08:00
Nutomic cc86792505 Multi-community fixes (#6046)
* Case insensitive comparison for read_from_apub_id (fixes #6037)

* Read multi-community by name (ref #6040)

* remove method

* Add rss feed (fixes #6040)

* clippy

* lower index

* clippy

* clippy

* revert lowercase ap_id comparison

* as select

* rss description

---------

Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
2025-10-10 00:46:24 +08:00