Commit graph

4752 commits

Author SHA1 Message Date
Freek van Zee 920adccdb4 Merge branch 'main' into feature/custom-emoji-and-tagline-views 2024-04-16 22:15:23 +02:00
Freek van Zee 4771085253 Update custom_emoji_view
Only keep get_all als helper function calling list with paging ignored

Only order on category when filtering on category
2024-04-16 22:03:06 +02:00
Dessalines d075acce43
Make all single-fetch database calls return an Option. (#4617)
- Diesel ordinarily throws an error when no results are returned for a
  single fetch, which is a bit confusing. This PR ensures that the
  missing value cases are all caught, and wrapped with new LemmyErrors,
  rather than diesel errors.
- Fixes #4601
2024-04-16 14:48:15 +02:00
Freek van Zee 1f629cc02d Add ignore_page_limits for custom emojis
EmojiPicker needs to be able to retrieve all emojis in 1 call
2024-04-14 12:44:46 +02:00
Freek van Zee 999e9845e7 Update TaglineInserForm and TaglineUpdateForm 2024-04-11 21:40:50 +02:00
Nutomic 3a0c1dca90
Avoid overwriting local objects via federation (#4611)
* Dont allow federation to overwrite local objects

* is_local check in apub lib

* use imports

* fix check, update lib

* use verify_is_remote_object()

* submodule
2024-04-11 10:05:49 -04:00
dullbananas 0f6b13a4ec
Test coverage (#4596)
* update .gitignore

* add test-with-coverage.sh

* coverage gutters extension comment

* move lcov.info to target folder

---------

Co-authored-by: SleeplessOne1917 <28871516+SleeplessOne1917@users.noreply.github.com>
2024-04-11 10:32:07 +02:00
Dessalines 64760ec960 Version 0.19.4-beta.3 2024-04-10 11:03:11 -04:00
Dessalines 555f789269
Fixing custom_thumbnail updates. (#4593)
* Fixing custom_thumbnail updates.

* Fixing issue with image posts.

* Fixing upgrade deps script.

* Adding API tests for custom thumbnails.

* Remove pointless todo.

* Address PR comments.

---------

Co-authored-by: SleeplessOne1917 <28871516+SleeplessOne1917@users.noreply.github.com>
2024-04-10 10:59:46 -04:00
Dessalines 5dea21d531
Convert all Result<..., LemmyError> into LemmyResult<...> Fixes #4613 (#4614)
* Convert all Result<..., LemmyError> into LemmyResult<...> Fixes #4613

* Fixing clippy.
2024-04-10 10:14:11 -04:00
Kroese d5622a65f8
Fix for PictrsImageMode::None (#4604)
* Fix PictrsImageMode::None

* Update crates/api_common/src/request.rs

Co-authored-by: SleeplessOne1917 <28871516+SleeplessOne1917@users.noreply.github.com>

* Fix formatting

---------

Co-authored-by: SleeplessOne1917 <28871516+SleeplessOne1917@users.noreply.github.com>
2024-04-10 10:09:54 -04:00
Nutomic 9059de8569
Allow fetching from local url, add fetch redirect test (fixes #4526) (#4607)
* Allow fetching from local url, at fetch redirect test (fixes #4526)

* prettier

* update lib

* update apub lib
2024-04-10 10:04:57 -04:00
Nutomic 0203b62a6d
Ignore old federated post edits (ref #4529) (#4586)
* Ignore old federated post edits (ref #4529)

* use filter on insert

* coalesce(updated, published)

* avoid comment conflict clause

---------

Co-authored-by: SleeplessOne1917 <28871516+SleeplessOne1917@users.noreply.github.com>
2024-04-10 10:03:51 -04:00
Dessalines 99d585b7be
Change defaults on user vote display mode to upvotes + downvotes (#4599)
* Change defaults on user vote display mode to upvotes + downvotes

* Forgot to regenerate the rows.

* Drop and re-add columns instead.
2024-04-10 10:47:05 +02:00
Nutomic b4670988b5
Change exponential backoff algorithm for federation send (#4597)
* Limit federation send retry interval to one hour

* clippy

* avoid overflow

* change base for exp backoff

* ignore first error

* fix day duration
2024-04-09 19:33:01 -04:00
Nutomic 1d0a6ac08f
Avoid breaking api change, reduce api cache duration (#4610)
* Dont mark site.public_key as `serde(skip)` to avoid breaking change (fixes #4605)

* Reduce cache duration for api
2024-04-09 10:10:20 -04:00
Freek van Zee 6935acba2f Remove local_site_id from tagline and custom_emoji 2024-04-08 23:14:03 +02:00
Freek van Zee 562c909f4b Updat misleading comments 2024-04-08 21:40:11 +02:00
Freek van Zee 8c7b3001ae Remove unecessary clone 2024-04-08 21:39:17 +02:00
Freek van Zee 7ce89fb5e6 Consolidate Tagline error types 2024-04-08 21:28:55 +02:00
SleeplessOne1917 5cf15a4c8c
Merge branch 'main' into feature/custom-emoji-and-tagline-views 2024-04-08 17:07:02 +00:00
Dessalines 8e54a4a6cc
Fixing bug where comment replies wouldn't be sent to blocked instances. (#4595)
* Fixing bug where comment replies wouldn't be sent to blocked instances.

- Instance blocks should only affect communities, not comments.
- Fixes #4590

* Revert "Fixing bug where comment replies wouldn't be sent to blocked instances."

This reverts commit 1349aa351a.

* Only block replies from the community's instance id.

- Also refactor send_local_notifs slightly, since it has to fetch the
  community now.
- Fixes #4590

---------

Co-authored-by: SleeplessOne1917 <28871516+SleeplessOne1917@users.noreply.github.com>
2024-04-08 16:26:24 +02:00
jim-taylor-business a14ebefd24
When env variable is set, any config file will be ignored and the default settings will be used (#4594)
* do not panic when no config file found use defaults

* formatting

* implement env variable

* ermove commented code

* remove redundant comment

* remove redundant space

* simplify check logic

* format

* returns and messages

* correct mistake
2024-04-08 12:05:54 +02:00
Freakazoid182 6ffcc1f98a Use process_markdown instead of process_markdown_opt 2024-04-07 11:06:55 +02:00
Freakazoid182 7759602c9d Make content fields non optional
Add error types for tagline validation
2024-04-06 12:17:47 +02:00
SleeplessOne1917 55be9a14ac
Merge branch 'main' into feature/custom-emoji-and-tagline-views 2024-04-05 21:05:51 -04:00
Freakazoid182 b2b8c43757 Validate markdown on tagline 2024-04-05 23:34:43 +02:00
Freakazoid182 abdfc90dbe Check markdown for tagline 2024-04-05 23:20:59 +02:00
Freakazoid182 ead51517e4 Remove delete from tagline and custom emoji impls 2024-04-05 22:57:36 +02:00
Freakazoid182 bab417a73e Impl Crud for CustomEmoji 2024-04-05 22:55:36 +02:00
Freakazoid182 5342a22765 Move tagline endpoints under /admin 2024-04-05 22:36:37 +02:00
Freakazoid182 144c112247 Impl Crud for Tagline
Remove superfluous properties
2024-04-05 22:36:08 +02:00
Freakazoid182 f1b993f90e Get random tagline on site requets 2024-04-04 23:07:51 +02:00
Freakazoid182 2b1fdf106b Remove custom_emojis and taglines from site resource 2024-04-04 22:26:19 +02:00
Dessalines 705e86eb4c
Fixing docker release (#4592)
* Re-add notif on tag failure.

* Upping rust version.

* Version 0.19.4-beta.1a

* Try again.

* Version 0.19.4-beta.1b

* Removing unstable inspect.

* Version 0.19.4-beta.1c

* Remove use release cache.

* Trying to fix cargo publish 1.

* Version 0.19.4-beta.1d

* Re-adding publish release

* Version 0.19.4-beta.2

* Fixing workspace for lemmy_federate
2024-04-04 16:14:59 +02:00
Dessalines a1d632e582
Re-add notif on tag failure. (#4591) 2024-04-04 10:21:31 +02:00
Nutomic 087684658a
Cache result of LocalSite::read to avoid unnecessary db calls (#4585)
* Cache result of LocalSite::read to avoid unnecessary db calls

* single const for cache duration

* clippy

* revert apub send changes

* clippy

* fmt
2024-04-03 17:38:31 -04:00
Dessalines aaaa362b98
Remove latest tag for pgformatter. (#4589) 2024-04-03 17:29:24 -04:00
Dessalines 5237233f97 Version 0.19.4-beta.1 2024-04-03 16:50:35 -04:00
Freakazoid182 5358908c17 Format through lint.sh 2024-04-03 22:49:02 +02:00
Freakazoid182 e536d39c2b Add delete tagline endpoint 2024-04-03 22:42:25 +02:00
Freakazoid182 ab938062e4 Add update tagline endpoint 2024-04-03 22:33:43 +02:00
Freakazoid182 a1a7e2ca33 Add create tagline endpoint 2024-04-03 22:14:25 +02:00
Dessalines 94438a8516
Removing cardano, this was never used. (#4588) 2024-04-03 10:38:57 +02:00
Freakazoid182 486c746eb9 Add category filter for custom emoji 2024-04-02 23:23:01 +02:00
Freakazoid182 17e2834e1b Remove unecessary TaglineView 2024-04-02 22:27:53 +02:00
Dessalines 4d9c16a336
Fix private message sort order. #4581 (#4587) 2024-04-02 13:25:28 -04:00
Nutomic ae9f82b452
Read crate version from cargo.toml (fixes #4583) (#4584) 2024-04-02 11:19:51 -04:00
dullbananas 007e9b7aab
Optimize Community::set_featured_posts (#4579)
* Don't lock excess rows in Community::set_featured_posts

* Update community.rs

* Update community.rs

* Update community.rs

* Update community.rs
2024-04-02 11:19:04 -04:00
Freakazoid182 10a8f01fad Apply linting 2024-03-31 17:42:48 +02:00