Commit Graph

3969 Commits (69f179bd334f76b3cc0222ddee1e0bc919653477)
 

Author SHA1 Message Date
Dessalines 69f179bd33
Prettier check (#2855)
* Adding prettier check to CI.

* Running prettier on codebase.
1 year ago
Nutomic ce5161d997
Downgrade postgres for CI to 15.2 (fixes #2857) (#2859) 1 year ago
SleeplessOne1917 0379c9e4c1
Make volumes used in docker compose work when running on machines with SELinux enabled (#2853)
* Make volumes used in docker compose work when running on machines with SELinux enabled

* Switch lemmy-ui comments

---------

Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
1 year ago
Nutomic af5175a282
Set attribute `deny_unknown_fields` for Lemmy config (#2852)
With this attribute, Lemmy will throw an error and exit if any
invalid entry is found in the config file. I think can be useful
to notice typos or keys that were removed or renamed in an upgrade.
Currently you wouldnt notice these at all unless you manually
compare the config file with settings that are listed in documentation.

This should be considered a breaking change.

Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
1 year ago
Dessalines 32a5567cbf
Fixing empty req issue. (#2849)
* Fixing empty req issue.

* Forgot skip serializing none.
1 year ago
Dessalines d63b1ba935
Upgrade api_test deps (#2850)
* Upgrade api_test deps

* Fix cargo fmt.

* Try to trigger a new format
1 year ago
Dessalines 014c0ad87f
Adding comments to all API related types. Fixes #2846 (#2848) 1 year ago
Dessalines 88a0d2feec
Adding typescript generation for API. Fixes #2824 (#2827)
* Adding typescript generation for API. Fixes #2824

* Try to fix Ltree issue 1.

* Forgot a few types.

* Fixing api tests.

* Removing url_serde line.

* Manually deriving TS for some types.
1 year ago
Dessalines 1b5437cbe3
Addressing slow profile queries. #2777 (#2830)
* Addressing slow profile queries. #2777

* Addressing PR comments.
1 year ago
Dessalines 17527d0e7e
Reverting to older non-multi-arch dockerfile. Fixes #2832 (#2833) 1 year ago
Nutomic a25faf3e97
Add `to` field in follow activities for better compatibility (#2829)
* Add `to` field in follow activities for better compatibility (fixes #2744)

* fix tests
1 year ago
Dessalines a2fb4b8cd0
Use older git clone for woodpecker. (#2831) 1 year ago
Dessalines eb40aeb89b
Remove last Option<Vec.. from API. Fixes #2820 (#2822)
* Remove last Option<Vec.. from API. Fixes #2820

* Add empty allowed_instances check.

* Adding comment for allowed_instances.
1 year ago
Dessalines 1e26709cb4
Adding cross_post fetching to GetPost. Fixes #2127 (#2821) 1 year ago
6543 85ef507ac7
Use Dockerfile.multiarch as Dockerfile (#2818)
* use Dockerfile.multiarch and delete old Dockerfile

* Dockerfile.multiarch -> Dockerfile

* nit
1 year ago
Dessalines d8722b6e91
Adding diesel enums for SortType and ListingType (#2808)
* Adding diesel enums for SortType and ListingType

- Uses diesel-derive-enum.
- Adds diesel.toml , so we can again use the auto-generated schema.rs
- Fixes a lot of DB null issues and column ordering issues.
- Fixes #1136
- Also replaces RegistrationMode boilerplate.

* Fixing unit tests 1.

* Remove comment line.

* Before patch.

* Before again.

* Using patch file to fix diesel_ltree issue with diesel.toml

* Adding some yalc ignores

* Fixing RegistrationMode enums

* Adding woodpecker diesel schema check.

* Try adding openssl 1.

* Try using diesel-cli image 1

* Try using diesel-cli image 2

* Try using diesel-cli image 3

* Try using diesel-cli image 4

* Try using diesel-cli image 5

* Try using diesel-cli image 6

* Try using diesel-cli image 7

* Try using diesel-cli image 8

* Try using diesel-cli image 9

* Try using diesel-cli image 10

* Try using diesel-cli image 11

* Try using diesel-cli image 12

* Try using diesel-cli image 13
1 year ago
SleeplessOne1917 f5511cfd25
Make path to local lemmy-ui use correct relative path (#2817) 1 year ago
SleeplessOne1917 922b50fc7c
Add lemmy-bot to README libraries list (#2816) 1 year ago
Dessalines 33ba1fc623
Separate federated_instances into its own endpoint. Fixes #1931 (#2813) 1 year ago
6543 90c6dc2732
Use official rust image and clean up Dockerfiles (#2804)
* Add docker/Dockerfile.multiarch

* Update normal Dockerfile to be similar to multiarch one

* docker build run on x86 and arm64 now
manifest not needed, its handled by buildx plugin

* Rename Dockerfile.arm To Dockerfile.debian

* Emulate builder on arm target too

* fix misspell

* Improve Dockerfiles

* naming

* undo multiarchbuild settings as its blocked by a dependeny, see #2806

* Delete Dockerfile.debian
1 year ago
Dessalines 3fa713f414
Temporary fix for hiding deleted posts. #2624 (#2811) 1 year ago
Dessalines 148f33def5
Leave modded communities on account deletion. Fixes #2560 (#2810) 1 year ago
Dessalines 38d4429ae7
Adding check to description and body length fields. (#2805)
* Adding check to description and body length fields.

- Also making the checks return `LemmyError`
- Fixes #1747

* Address PR comments.

* PR comments 2
1 year ago
6543 e7a2080f3f
Fix & Optimize CI config (#2802)
* let the clone plugin handle submodules too

* start using yml aliase

* fix publish_to_crates_io

* CI.restart()
1 year ago
Dessalines 63f54a3103
Making the chat server an actor. (#2793)
* Making the chat server an actor.

- Fixes #2778
- #2787

* Forgot to add handlers folder.

* Some cleanup.

* Forgot to remove a comment.

* Address PR comments.

* Using ToString for enum operations.
1 year ago
Nutomic 844cde9db3
Use pretty print for federation json responses (#2801) 1 year ago
Nutomic 9d26ac2c6f
Fix listing type default value (#2796)
* Fix listing type default value

The listing type parameter is only meant for the frontpage, but is
also applied inside of communities. The result is that this call
returns nothing, because it defaults to ListingType::Local:
https://fedibb.ml/api/v3/post/list?community_id=3

It needs to be called like this to get any posts:
https://fedibb.ml/api/v3/post/list?community_id=3&type_=All

This is clearly not expected behaviour, when a community is
specified, the listing type should default to All.

* fix clippy
1 year ago
Dessalines d18bc95b7b
Add woodpecker ci (#2789)
* Adding woodpecker. Try 1

* Adding woodpecker. Try 2

* Adding woodpecker. Try 3

* Adding woodpecker. Try 4

* Adding woodpecker. Try 5

* Adding woodpecker. Try 6

* Adding woodpecker. Try 7

* Adding woodpecker. Try 8

* Adding woodpecker. Try 9

* Adding woodpecker. Try 10

* Adding woodpecker. Try 11

* Adding woodpecker. Try 12

* Adding woodpecker. Try 13

* Adding woodpecker. Try 14

* Adding woodpecker. Try 15

* Adding woodpecker. Try 16

* Adding platform when conditionals.

* Adding platform when conditionals 2.

* Adding woodpecker docker buildx.
1 year ago
Nutomic 3a526b0b7d
Remove unused dependencies (#2795) 1 year ago
Nutomic 165b19e75c
Optimize federated language updates to avoid unnecessary db writes (#2786)
* Optimize federated language updates to avoid unnecessary db writes (fixes #2772)

* fix tests

* fix test, rename functions

---------

Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
1 year ago
Helge fdaa2bcf09
Added identifier to context (#2791) 1 year ago
Nutomic 6f513793cb
Activitypub crate rewrite (#2782)
* update activitypub-federation crate to 0.4.0

* fixes

* apub compiles!

* everything compiling!

* almost done, federated follow failing

* some test fixes

* use release

* add code back in
1 year ago
Anon 6bc49bdd70
Add Custom Emojis Support (#2616)
* Add Custom Emojis

* Modify index
1 year ago
Dessalines 66b0ddbbc5
Adding deadpool timeouts. (#2775) 1 year ago
Dessalines 1dba94c9cb
Adding TOTP / 2FA to lemmy (#2741)
* Combine prod and dev docker setups using build-arg

- Fixes #2603

* Dont use cache for release build.

* Adding 2FA / TOTP support.

- Fixes #2363

* Changed name to totp_2fa for clarity.

* Switch to sha256 for totp.
1 year ago
Dessalines 985fe24669
Get rid of Safe Views, use serde_skip (#2767)
* Get rid of Safe Views, use serde_skip

- Also change the ViewToVec, to work with non-vector cases. Might be
  necessary in preparation for #2763
- Fixes #2712

* Forgot one safe

---------

Co-authored-by: Nutomic <me@nutomic.com>
1 year ago
Dessalines 48f187188b
Show deleted and removed posts for profile views. Fixes #2624 (#2729)
* Show deleted and removed posts for profile views. Fixes #2624

* Only showing non-deleted/removed posts for creator.

* Add a admin or mod check to views, to show deleted and removed posts.

- Also removed the pointless "blanking" functions

* Fix clippy

* Make hidden posts comment clearer.

* Fixing federation tests.

* Fixing fmt.
1 year ago
Nutomic d9e7f0100a
Dont upsert Instance row every apub fetch (#2771)
This is not necessary because the domain cant change, so we only
need to insert if no row exists for this domain.

Also fetch instance actor when parsing person, not only community

Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
1 year ago
Dessalines 3844ac76c3
Fixing broken websockets. (#2770)
* Fixing broken websockets.

* Use cloned() for serde::Value
1 year ago
Nutomic f0e1627824
Ignore undetermined language when calculating post default language (#2769)
This will make it much more likely to successfully get a default,
as most users and communities have undetermined selected.
1 year ago
Dessalines 209c8a9185
Switch from bb8 to deadpool. Fixes #2765 (#2768)
* Switch from bb8 to deadpool. Fixes #2765

* Remove unecessary deadpool dependency.

* Ignoring nodeinfo test.
1 year ago
Dessalines 8c0c1628e0
Adding a vector indexing check to prevent panics. Fixes #2753 (#2754)
* Adding a vector indexing check to prevent panics. Fixes #2753

* Fixing for new clippy lint.

* Externalizing get_top_mod check. Adding get_first clippy lint

* Removing unit tests get(0)s

* Fixing some firsts manually
1 year ago
Dessalines 4c77c84b60
Cleaning up person_view sorts (#2760) 1 year ago
Nutomic 80571567e1
Add default attribute for webfinger properties (fixes #2756) (#2759) 1 year ago
Dessalines 155af88582 Adding 0.17.2 Release notes. 1 year ago
Nutomic 675353d4e9
Include type information with webfinger responses (fixes #2037) (#2746)
So that it is easier to parse for other software
1 year ago
Dessalines cd5c79527a
Fixing issue with saving site language. Fixes #2748 (#2749)
* Fixing issue with saving site language. Fixes #2748

* Add a warning to Site::read
1 year ago
Nutomic a42f7271e6
Proper permission check for federated comment distinguish (#2697)
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
1 year ago
Nutomic 62663a9f2e
Implement separate mod activities for feature, lock post (#2716)
* Implement separate mod activities for feature, lock post

Also includes collection for featured posts. Later we also need
to do the same for Comment.distinguished

* some changes

---------

Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
1 year ago
Nutomic 8409e50f8c
Fix case in activitypub context (ref #2734) (#2743)
Should be camelCase.

Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
1 year ago