Commit graph

572 commits

Author SHA1 Message Date
Dessalines 3f2a689edf
Don't search for community descriptions, search for user display_name. (#2430)
- https://github.com/LemmyNet/lemmy-ui/issues/756
2022-09-07 08:58:41 +00:00
Dessalines 265dc54627
Increase default search rate limit. (#2424) 2022-09-03 11:37:27 +02:00
Felix Ableitner 0a14b17747 fix clippy 2022-09-02 10:49:54 -04:00
Felix Ableitner 3295784ebb dont set default user languages in api code (already done in db) 2022-09-02 10:49:54 -04:00
Felix Ableitner 5e8a37ac86 clippy fixes 2022-09-02 10:49:54 -04:00
Felix Ableitner d058e2217a api changes for comment language tagging 2022-09-02 10:49:54 -04:00
Felix Ableitner bc7450ae3e add test for comment view languages 2022-09-02 10:49:54 -04:00
Felix Ableitner f5b1ee6c34 fix tests 2022-09-02 10:49:54 -04:00
Felix Ableitner 3d0d8796ad Add language tags for comments 2022-09-02 10:49:54 -04:00
Nutomic a6dc6804aa
Pass LocalUser to PostQuery etc, instead of separate params (#2413) 2022-08-19 10:27:39 -04:00
Nutomic e4a49b6eab
Tag posts and comments with language (fixes #440) (#2269)
* Tag posts and comments with language (fixes #440)

* Untangle PostView tests

* Implement test for PostView language query

* Store languages directly in database

* finish moving languages into db, it compiles

* update post_view

* serde skip Language.id field

* add local_user_language table, other changes suggested in review

* add code for local_user_discussion_language_view

* Remove unnecessary clones in db view converteres

* Fixing up some table and join issues.

* Clearing the current languages.

* Fix formatting.

* update user languages in single transaction

* proper test for user language queries

* Some fixes for all / missing user languages. (#2404)

* Some fixes for all / missing user languages.

* Adding back in transaction.

* fix test

Co-authored-by: Dessalines <tyhou13@gmx.com>
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
2022-08-18 15:11:19 -04:00
Nutomic c89006c94a
Rejected federated pm from blocked users (fixes #2398) (#2408) 2022-08-17 16:53:19 -04:00
Dessalines 870abf8442
Adding distinguish comment. Fixes #2002 (#2391)
* Adding distinguish comment. Fixes #2002

* Adding lemmy:distinguished
2022-08-17 11:38:52 +00:00
Nutomic 583ceb2506
Fix pictrs routing (#2407)
* SUGGESTED FIX TO PICTRS ROUTING 404 ERROR #2359

Removed slashes at "/image" routes.

* cargo fmt

Co-authored-by: Majid  <72635080+umamawme@users.noreply.github.com>
2022-08-16 11:20:41 -04:00
Anon 21455d6b73
Add Modlog Filters (#2313)
* Fix crash running locally on windows.

* Add support for filtering mod logs

* Refactor cleanup

* Clippy fix

* Condense match statements

* Clippy fix 2
2022-08-16 11:52:04 +00:00
vpzomtrrfrt 08a797c986
Accept Image objects in attachments (#2394) 2022-08-16 10:12:43 +00:00
Nutomic 8a4d9cc1ba
Use typed-builder crate for queries (#2379)
* Use typed-builder crate for PrivateMessageQuery

* derive builder for all queries

* remove unnecessary clones

* fix tests
2022-08-04 15:30:17 -04:00
Nutomic 7094a0c0a4
Use doku release version (ref #2343) (#2386) 2022-08-02 15:38:19 +02:00
Dessalines 9c3efe32e7
First pass at adding comment trees. (#2362)
* First pass at adding comment trees.

- Extracted comment replies into its own table.
- Added ltree column to comment
- Added parent_id param to GetComments to fetch a tree branch
- No paging / limiting yet

* Adding child_count to comment_aggregates.

* Adding parent comment update counts

* Fix unit tests.

* Comment tree paging mostly done.

* Fix clippy

* Fix drone tests wrong postgres version.

* Fix unit tests.

* Add back in delete in unit test.

* Add postgres upgrade script.

* Fixing some PR comments.

* Move update ltree into Comment::create

* Updating based on comments.

* Fix send soft fail.
2022-07-30 05:55:59 +02:00
Nutomic becb8b4f66
Update apub examples to remove to field (ref #2380) (#2382) 2022-07-29 13:30:38 -04:00
Nutomic a85334c675
Handle Like, Undo/Like activities from Mastodon, add tests (fixes #2378) (#2380) 2022-07-29 15:32:12 +02:00
Dessalines 8bfeb4b627
Fix a few form options for diesel. Fixes #2287 (#2376)
* Fix a few form options for diesel. Fixes #2287

* Adding TODO comment.
2022-07-29 15:04:21 +02:00
Dessalines 3b86e15399
Remove listing type community. Fixes #2361 (#2377)
* Remove listing type community. Fixes #2361

* Have ListingType::All be the default
2022-07-29 10:57:39 +00:00
Nutomic b78826c2c8
Dont allow login if account is banned or deleted (fixes #2372) (#2374) 2022-07-28 23:14:07 +02:00
Dessalines c62671116c
Send websocket message on accepted follow. Fixes #2369 (#2375) 2022-07-28 15:49:26 +00:00
Nutomic b9f1fc0518
Fix panics in search_by_apub_id() (fixes #2371) (#2373) 2022-07-27 17:03:44 -04:00
Nutomic eee8f467b5
Fix follow being stuck as pending after accept (#2366)
* Fix follow being stuck as pending after accept

* fix api test
2022-07-20 14:10:29 +00:00
Nutomic 16fe149a6d
Change config pictrs key name (#2360) 2022-07-14 14:25:10 -04:00
Nutomic d0a3d99636
Config changes, remove unused image purge function (#2343)
* Throw error if old pictrs config item is used, make api key optional

* use doku url feature

* fix doku version

* fix clippy

* remove unused image purge function, remove config migration
2022-07-11 16:38:37 -04:00
Nutomic 63fff96275
Fix problem where actors can have empty public key (fixes #2347) (#2348) 2022-07-11 18:25:33 +00:00
Luna e33736ae47
remove parking_lot (#2350) 2022-07-11 17:12:12 +00:00
Dessalines 67a34adf4b
Revert "Use correct url for activitystreams protocol context (#2326)" (#2351)
This reverts commit dc35ab9c2b.
2022-07-08 10:47:40 +00:00
Dessalines ff026dc3ff
Adding check for requests with no id or name, adding max limit. (#2265)
* Adding check for requests with no id or name, adding max limit.

* Consolidating a few functions.

* Fix page min

* Adding more websocket rate limits.

* Add check to GetCommunity

* Use a default message rate limit check.

* Adding a page and limit checker

* Fix clippy

* Fix clippy again

* Adding check for requests with no id or name, adding max limit.

* Consolidating a few functions.

* Fix page min

* Adding more websocket rate limits.

* Add check to GetCommunity

* Use a default message rate limit check.

* Adding a page and limit checker

* Fix clippy

* Fix clippy again

* Fix limit request.

* Move checks to inside limit_and_offset

* Fixing API tests.

* Change NotFound diesel errors to QueryBuilderError
2022-07-08 10:21:33 +00:00
Nutomic 3ef812660c
Dont allow blocking admin (#2340) 2022-07-05 23:02:54 +00:00
Nutomic b7a2677b4d
Be more explicit about returning deleted actors or not (#2335)
* Be more explicit about returning deleted actors or not

* simplify db queries
2022-07-05 17:40:44 -04:00
Nutomic 587a0de8f7
Specify minimum Rust version 1.57 (fixes #2333) (#2334)
* Specify minimum Rust version 1.57 (fixes #2333)

* use latest rust for clippy

* use rust 1.60 for clippy

* no add component

* use official rust docker

* comments
2022-06-28 17:44:55 -04:00
Dessalines a745fa6f43
Remove update and read site config. Fixes #2306 (#2329)
* Remove update and read site config. Fixes #2306

* Removing lazy_static, removing Settings::get()
2022-06-22 20:24:54 +00:00
Dessalines 8af913f583
Don't create or initially follow a default community. Fixes #2317 (#2328)
* Don't create or initially follow a default community. Fixes #2317

* Fix unit tests.
2022-06-22 19:38:27 +00:00
Dessalines 40609549d8
Increase RSS fetch limit to 20. Fixes #2319 (#2327) 2022-06-22 12:30:09 +00:00
Dessalines 92d17639cd
Expose pending 2 (#2282)
* Exposing SubscribedType. Fixes #2281

* Fixing other subscribed fields.

* Fix federation tests

* Add comment about follower row.
2022-06-22 12:05:41 +00:00
Nutomic dc35ab9c2b
Use correct url for activitystreams protocol context (#2326) 2022-06-21 15:27:10 -04:00
Nutomic cd4d235171
Move setting http_fetch_retry_limit into federation block (#2314) 2022-06-14 01:20:30 -04:00
Dessalines 4e12e25c59
Adding admin purging of DB items and pictures. #904 #1331 (#1809)
* First pass at adding admin purge. #904 #1331

* Breaking out purge into 4 tables for the 4 purgeable types.

* Using CommunitySafe instead in view

* Fix db_schema features flags.

* Attempting to pass API key.

* Adding pictrs image purging

- Added pictrs_config block, for API_KEY
- Clear out image columns after purging

* Remove the remove_images field from a few of the purge API calls.

* Fix some suggestions by @nutomic.

* Add separate pictrs reqwest client.

* Update defaults.hjson

Co-authored-by: Nutomic <me@nutomic.com>
2022-06-13 19:15:04 +00:00
trwnh 5b7376512f
Fix: Use correctly parseable JSON-LD context (#2299)
* Fix: Use correctly parseable JSON-LD context

* Changed: Better ordering for context document

alphabetized properties

* Changed: Use xsd types instead of schema.org types

* Changed: use simple namespacing
2022-06-13 13:26:56 +00:00
Nutomic fcaf7a084c
Upgrade activitypub_federation to 0.2.0, add setting federation.debug (#2300) 2022-06-08 11:45:39 -04:00
Nutomic 7bc2f9fd6d
Remove unused setup config vars (#2302) 2022-06-08 11:44:53 -04:00
Nutomic c050945b1f
Add pub use for db crates in api_common (#2305) 2022-06-08 11:30:20 -04:00
Nutomic 7804a9d893
Accept private like (#1968) (#2301) 2022-06-08 11:14:38 -04:00
Paolo Barbolini 0a3b69a259
Bump lettre to 0.10.0-rc.7 (#2297) 2022-06-04 22:07:38 -04:00
Nutomic 780832256c
Remove unused cargo.toml files (#2293) 2022-06-03 15:56:33 +00:00