Commit Graph

4242 Commits (70fae9d68d65b1e4d153e30d3c065cc315b75eaf)
 

Author SHA1 Message Date
Dessalines 70fae9d68d
Fixing broken SQL migration formatting. (#3800)
* Fixing SQL format.

* Fixing clippy lints.

* Fixing clippy lint 2.
10 months ago
Nutomic 2d0f77af59
Dont use sha hash for password reset token (fixes #3491) (#3795) 10 months ago
Nutomic 27be1efb74
Rewrite remaining federation actions, get rid of PerformCrud trait (#3794)
* Rewrite ban actions

* Rewrite delete/remove actions

* Rewrite remove/delete community

* Rewrite report actions

* Rewrite feature/lock post

* Rewrite update community actions

* Rewrite remaining federation actions

* Get rid of PerformCrud trait

* clippy
10 months ago
Dessalines be1389420b
Adding SQL format checking via `pg_format` / pgFormatter (#3740)
* SQL format checking, 1.

* SQL format checking, 2.

* SQL format checking, 3.

* SQL format checking, 4.

* SQL format checking, 5.

* Running pg_format

* Getting rid of comment.

* Upping pg_format version.

* Using git ls-files for sql format check.

* Fixing sql lints.

* Addressing PR comments.
10 months ago
RocketDerp b4380cb548
Do not hide read posts when it is a user profile view (#3791) 10 months ago
Nutomic 58388f2ce8
Only run slow CI checks for actual code changes (attempt 2) (#3759)
* Only run slow CI checks for actual code changes (attempt 2)

* use when path include

* change rust

* update

* x

* y

* zsad

* remove println

* fmt

* readme

* Revert "readme"

This reverts commit d58b6ad973.

* ci

* gitmodules
10 months ago
Louis GERARD 7bc64ab91a
Remove follow community traits (#3737)
* chore(FollowCommunity): remove Perform and Send Activity traits

* chore(FollowCommunity): avoid fetching community and person from db
10 months ago
dullbananas 91834d0d21
Default imprementations for read and delete in Crud trait (#3707)
* h

* Start doing stuff

* Default impl for Crud::read

* Simplify Crud::read lifetimes

* fmt

* Stuff

* Stuff

* Successfully make default read implementation work

* Restore Person::read

* Clean up default Crud::read and rename 'query2

* Replace filter with find

* Attempt default Crud::create

* Change Crud to Crud<'a> (won't compile)

* Revert "Change Crud to Crud<'a> (won't compile)"

This reverts commit 7ed20f5f71.

* Default Crud::delete

* Remove Crud::delete definitions that match default

* Remove commented Site::read

* Insert trait

* Revert "Insert trait"

This reverts commit 9d780c2403.

* Use non-borrowed forms

* Revert "Use non-borrowed forms"

This reverts commit d2dd442563.

* Revert "Revert "Change Crud to Crud<'a> (won't compile)""

This reverts commit 25a27165a8.

* Fix lifetime for everything except Crud::delete

* Fix Crud::delete

* Add comment about futures

* Attempt Crud::create

* Attempt separate CrudBounds

* Revert "Attempt separate CrudBounds"

This reverts commit 1b4ca321c3.

* Try to fix Crud::create

* Move lifetime parameters to associated types

* Revert "Move lifetime parameters to associated types"

This reverts commit af1bc858ce.

* Revert "Try to fix Crud::create"

This reverts commit eec238496c.

* Revert "Revert "Attempt separate CrudBounds""

This reverts commit 1ec33ce502.

* Revert "Attempt separate CrudBounds"

This reverts commit 1b4ca321c3.

* Revert "Attempt Crud::create"

This reverts commit 47e8071b68.

* Revert "Add comment about futures"

This reverts commit b266b14653.

* Revert "Fix Crud::delete"

This reverts commit 3abcce2eec.

* Revert "Fix lifetime for everything except Crud::delete"

This reverts commit c1ad7a161b.

* Revert "Revert "Revert "Change Crud to Crud<'a> (won't compile)"""

This reverts commit 3129cd0fc3.

* Clean up

* Update site.rs
10 months ago
Nutomic d82194cfe9
Rewrite some federation actions to remove Perform/SendActivity (ref #3670) (#3758) 10 months ago
RocketDerp 05a7fced65
Enhanced testing of comments. Validate reply notifications, mentions (#3686)
* shared.ts first test of getReplies

* comment testing now validates reply notifications and mentions, some code comment cleanup in other functions

* comments revised

* first use of getUnreadCount in testing

* test notification of new comment replies, clarify usage of getReplies

* killall moved earlier in bash script

* api-test jest run does not need directory prefix, make consistent with other jest runs

* do not put my testing system password into script

* fix, killall exits script when no process found

* killall now moved to parent script to release locks before database create

* need to run killall a second time, before database drop

* first use of getReplies getPosts saveUserSettings

* accidental duplication of functions, removed

* try to sync shared library with main

* Nutomic feedback: Better to rename the var instead of putting a comment which can easily get outdated.

* Correct logic to meet join-lemmy requirement, don't have closed signups. Allows Open and Applications. (#3761)

Co-authored-by: Josh Bernardini <josh.bernardini@cologix.com>

* Fix fetch instance software version from nodeinfo (#3772)

Fixes #3771

* remove unused code, revert killall change

---------

Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
Co-authored-by: figure-0e <133478007+figure-0e@users.noreply.github.com>
Co-authored-by: Josh Bernardini <josh.bernardini@cologix.com>
Co-authored-by: Denis Dzyubenko <denis@ddenis.info>
Co-authored-by: Felix Ableitner <me@nutomic.com>
10 months ago
Denis Dzyubenko 55e383ae38
Fix fetch instance software version from nodeinfo (#3772)
Fixes #3771
10 months ago
figure-0e 6ed2ddf76d
Correct logic to meet join-lemmy requirement, don't have closed signups. Allows Open and Applications. (#3761)
Co-authored-by: Josh Bernardini <josh.bernardini@cologix.com>
10 months ago
Felix Ableitner 963d04b352 Revert "Only run slow CI checks for actual code changes (#3750)"
This reverts commit a34e0d477e.
10 months ago
Nutomic 543bd99900
Update CODEOWNERS (#3748) 10 months ago
Nutomic 39752fa096
Delete migrations_testing folder (#3751)
Its completely unused as far as I can see
10 months ago
Nutomic e365d48769
Move entry from .rgignore to .gitignore (#3752)
rg command respects gitignore, and sql dumps should be ignored by
git as well. So theres no reason to have a separate file.
10 months ago
Nutomic 37998b3398
Rewrite some API handlers to remove Perform trait (#3735)
* Rewrite some API handlers to remove Perform trait

* Convert CreateComment

* ci
10 months ago
Dessalines db76c5b7ff
Adding 0.18.3 Release notes. (#3753) 10 months ago
Nutomic a34e0d477e
Only run slow CI checks for actual code changes (#3750)
* Only run slow CI checks for actual code changes

Its a waste of time to compile Rust and run tests when only
something like the readme was changed.

* also make cache restore/rebuild conditional

* remove unused condition
10 months ago
Nutomic 0e6fb08284
Restore markdown quotes after sanitize (#3708) (#3749) 10 months ago
dullbananas 9a5a13c734
Use same table join code for both read and list functions (#3663)
* Try stuff

* Revert "Try stuff"

This reverts commit 3da5f83a8b.

* Revert "Revert "Try stuff""

This reverts commit 178bd43cac.

* Revert "Revert "Revert "Try stuff"""

This reverts commit b9f9a2316e.

* Revert "Revert "Revert "Revert "Try stuff""""

This reverts commit ccd498dd72.

* Try more stuff

* Add queries function

* Simplify queries function

* Move aliases to db_schema

* Revert "Move aliases to db_schema"

This reverts commit 69afed05c1.

* Add ReadFuture and ListFuture

* Refactor queries function and add Queries struct

* Box futures in Queries::new

* Use from_tuple

* Add comment_view::queries and improve comment_report_view::queries

* Add local_user_view::queries

* Add post_report_view::queries

* Ad post_view::queries

* Add private_message_report_view::queries

* private_message_view, registration_application_view

* Use 'a in BoxedQuery

* comment_reply_view, community_view

* Change aliases to inline module

* person_mention_view

* person_view

* Use separate community_person_ban joins instead of including boolean literal in join-on clause

* Fix comment_view

* rerun ci
10 months ago
phiresky e315092ee3
remove n^2 part of person triggers, improve community aggregate trigger (#3739)
* remove n^2 part of person triggers, improve community aggregate trigger

* comment out comment_score tests since previously they only accidentally succeeded

* empty
10 months ago
phiresky 1253a2a0d5
remove performance-problematic and buggy duplicate site aggregates (#3732) 10 months ago
Nutomic d909f3455d
Change readme installation link (#3736)
Replaces https://github.com/LemmyNet/lemmy/pull/3551
10 months ago
RocketDerp 21a87ebaf2
Federation tests replication round1 - demonstrate absent replication of comment deletes (#3657)
* more robust test of unlike a comment, confirm replication to instance downstream from community home

* more robust 'delete a comment' test, confirm replication

* Far more robust "Report a comment" test. Many comments about situation, this is currently failing because gamma does not get the report

* typo and actually have Gamma comment check use gamma, not alpha

* prepare-drone-federation-test.sh has some more echo output and note about the LEMMY_DATABASE_URL format (#3651)

* Add http cache for webfingers (#3317)

* Add http cache for webfingers

* Remove the outgoing cache middleware & adjust the cache headers directive

* Use 1h & 3day cache header

* Update routes and adjust the cache headers location

* revert apub caching

---------

Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
Co-authored-by: Felix Ableitner <me@nutomic.com>

* Rewrite activity lists to fix delete federation (fixes #3625)

* Revert "typo and actually have Gamma comment check use gamma, not alpha"

This reverts commit 7dfb6ee0f4.

* Revert "Far more robust "Report a comment" test. Many comments about situation, this is currently failing because gamma does not get the report"

This reverts commit 7bd3b20ae0.

* prettier TypeScript

* revised comments, as ResolveObject isn't using routine replication

* fmt

* fix api tests

* remove comment

---------

Co-authored-by: cetra3 <cetra3@hotmail.com>
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
Co-authored-by: Felix Ableitner <me@nutomic.com>
10 months ago
Bao 2d7b416652
Omit local instance from federated instances list (#3712)
Co-authored-by: Nutomic <me@nutomic.com>
10 months ago
phiresky 9bfa86d162
add trigram index to search (#3719)
* add trigram index to search

* add community index
10 months ago
Nutomic 3471f3533c
Sanitize html (#3708)
* HTML sanitization in apub code

* Sanitize API inputs

* fmt

* Dont allow html a, img tags

---------

Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
10 months ago
biosfood 2de994797e
Add moderator view parameter to list posts (#3176)
* add option to only show posts from moderated communities

* rename moderated_only to moderator_view and show blocked users in moderator view

* add test for moderator view

* bump lemmy-js-client version for moderation view tests

* fix yarn lockfile

* retry build

* Delete logfile

* retry checks

* remove unused select statement from list posts

---------

Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
10 months ago
Pavlos Smith c890797b37
Add controversial ranking (#3205)
* Added controversy rank property to posts and comments, and ability to sort by it

* Triggers instead of schedules tasks, integer -> double, TODO: comments don't seem to get updated with floats, divide SortTypes

* Created PersonSortType

* PersonSortType::MostComments case

* Removed unused PartialOrd trait

* Added new person sort type mappings

* SortType -> PersonSortType

* fixes

* cargo fmt

* fixes after merge with main

* Fixed bug in controversy rank trigger, removed TopX sorts from PersonSortType and added CommentScore instead

* Uncovered enum case

* clippy

* reset translation changes

* translations

* translations

* Added additional hot ordering on controversial posts and comments

* featured local and featured community added to controversy rank index, additional order_by removed (?), added post_score and post_count to PersonSortType

* Woodpecker rerun

* cargo fmt

* woodpecker rerun

* fixed controversy_rank order

* fix

* Readded migration as latest, removed second update statement for setting controversy rank
10 months ago
marsara9 dc4572460e
Make resolve_object not require auth #3685 (#3716)
* Resolves issue #3685

If user isn't authenticated with resolve_object, only allow a local search instead of possibly making an http request.

* Making sure to validate auth before doing a potential remote lookup.
10 months ago
Nutomic afac3ee7ff
Skip fragile API tests (#3723)
* Skip fragile API tests

These tests fail very often for no reason, eg in #3712 and #3696.
Better to disable them until they can be fixed.

* killall -s1
10 months ago
Domenic Horner f9351b6512
UI Settings - Blur NSFW & Auto Expand (#3377)
* add new flag to api

* add new ui settings for local user

* remove extraneous def

* add props to application reg.

* fix clippy updated these

* re-order db schema entries

* remove dupe

* update lemmy sdk

* update lemmy js client

---------

Co-authored-by: Nutomic <me@nutomic.com>
10 months ago
dullbananas 9b123f45ec
Enable gzip for reqwest (#3696)
This will reduce bandwidth used by federation

Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
10 months ago
Into the V0id cf2229d665
Dont authenticate user after successful password reset #3714 (#3715)
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
10 months ago
Freakazoid182 9a1f9aad45
detailed error message for blocked domains (#3698) (#3701)
* detailed error message for blocked domains (#3698)

* Pass the domain as an error param

Not formatting the error message to support i18n

---------

Co-authored-by: Freek van Zee <freek.van.zee@mediamonks.com>
10 months ago
Ben Wyatt 95e758e707
Bump version of dependency "webmention" (#3711)
Webmention .4->.5 bumps a few internal dependencies that needed to be upgraded
10 months ago
phiresky 3b09d8c882
prevent ordering by comment path without post filter (#3717) 10 months ago
asimons04 13a866aeb0
Update Dockerfile to run process as non-privileged user. (#3709) 10 months ago
Nutomic 102124b6d2
Change logic for determining comment default language (fixes #3451) (#3672) 11 months ago
Joel Beckmeyer ea7f83c4dc
disable rustfmt feature on rosetta-build (#3679) 11 months ago
Dessalines e17f0097ff
Fix federation test errors with new lemmy-js-client (#3678) 11 months ago
Dessalines 417c4d2311
Adding diesel migration check. Fixes #3676 (#3677)
* Adding diesel migration check. Fixes #3676

* Fixing prettier.
11 months ago
Dessalines 623d81139e
Make sure comments are sorted by hot_rank, then score. (#3667) 11 months ago
Nutomic ccc122100e
Fix process shutdown (#3673)
I noticed that stopping the Lemmy process with ctrl+c wasnt working
because the activity channel isnt properly closed. This is now fixed.

Later we should also move the channel from static into LemmyContext,
Im not doing that now to avoid conflicts with #3670.
11 months ago
Nutomic 1a164a649e
Ignore errors when fetching community mods (fixes #3460) (#3674) 11 months ago
Nutomic 3753a3bf54
Upgrade activitypub library to 0.4.6 (fixes #3222) (#3675) 11 months ago
Sander Saarend b511c2e6cb
Denormalize community_id into post_aggregates for a 1000x speed-up when loading posts (#3653)
* Denormalize community_id into post_aggregates for a 1000x speed-up when loading posts

* Remove unused index

* Add creator_id to post_aggregates

* Use post_aggregates as main table for PostQuery

* Make post_aggregates the main table for PostView

* Reformat SQL
11 months ago
Dessalines ced3aa5bd8
Fixing hot_ranks and scores to append a published sort. (#3618)
- #3428
11 months ago
Nutomic 047db9ac85
Handle displaying of deleted and removed posts/comments (fixes #2624) (#3286)
* Handle displaying of deleted and removed posts/comments (fixes #2624)

* remove duplicate test

* fix tests

* no show_removed/show_deleted

* merge

* partially fix tests

* fix tests

* clippy

* fix tests

* get rid of build_post_response_deleted_allowed
11 months ago