Commit graph

751 commits

Author SHA1 Message Date
Dessalines
cb753b045f
Group imports dess (#2526)
* Group imports with rustfmt

* Running cargo fmt again.

Co-authored-by: Felix Ableitner <me@nutomic.com>
2022-11-02 15:18:22 -04:00
28eade6168
Fix invalid config in docker/prod (fixes #2520) (#2524) 2022-11-02 18:50:09 +00:00
Dessalines
ed9e91345a
Fix local site images. (#2519)
* Fix local site images.

* It should be set up.
2022-11-02 12:10:40 +00:00
sam365724
7aa6d6b3e1
Fix 2455: Check auth for pictrs when instance is private. (#2477)
* Fix 2455: Check auth for pictrs when instance is private.

* Update, no utils function, use of existing get_local_user_view_from_jwt

* rustup toolchain install nightly (ftw)
2022-10-28 10:43:33 -04:00
6aa9bdebae
Fix limit_languages to operate on correct instance (fixes #2496) (#2518)
* Fix limit_languages to operate on correct instance (fixes #2496)

* cargo fmt
2022-10-28 10:42:05 -04:00
3b0be52e67
Image improvements (#2513)
* Image improvements

* remove rate limits
2022-10-28 14:34:40 +00:00
b0c3185663
Make verify apub url function async (#2514)
* Make verify apub url function async

* cleanup

* use dep from crates.io

* dont use unwrap
2022-10-28 09:38:22 -04:00
Dessalines
235cc8b228
Moving settings to Database. (#2492)
* Moving settings to Database.

- Moves many settings into the database. Fixes #2285
- Adds a local_site and instance table. Fixes #2365 . Fixes #2368
- Separates SQL update an insert forms, to avoid runtime errors.
- Adds TypedBuilder to all the SQL forms, instead of default.

* Fix weird clippy issue.

* Removing extra lines.

* Some fixes from suggestions.

* Fixing apub tests.

* Using instance creation helper function.

* Move forms to their own line.

* Trying to fix local_site_data, still broken.

* Fixing federation tests.

* Trying to fix check features 1.

* Addressing PR comments.

* Adding check_apub to all verify functions.
2022-10-27 09:24:07 +00:00
aaaea2006c
Federate votes as private (#2501) 2022-10-18 03:13:18 +00:00
74bc1198ce
Dont try to send activities if federation is disabled (fixes #2499) (#2500) 2022-10-17 14:29:18 -04:00
0a60bcb8ee
Return empty vec when reading all languages (fixes #2495) (#2497) 2022-10-17 09:37:22 +00:00
6c3e984ad1
Only allow authenticated users to fetch remote objects (#2493)
* Only allow authenticated users to fetch remote objects

* try to fix api tests
2022-10-13 16:30:31 +00:00
ec5e63b5a9
Fix check for federated mod actions (#2489) 2022-10-10 11:20:36 -04:00
2ef0f8f5f8
implement language tags for site/community in db and api (#2434)
* implement language tags for site/community in db and api

* add api checks for valid languages

* during db migration, update existing users, sites, communities to have all languages enabled

* init new users/communities with site languages (not all languages)

* federate site/community languages

* fix tests

* when updating site languages, limit community languages to this subset

also, when making a new post and subset of user lang, community lang
contains only one item, use that as post lang

* add tests for actor_language db functions

* include language list in siteview/communityview

* Fix some of the review comments

* Some more review changes

* Add todo about boxed query

* Add default_post_language to GetCommunityResponse
2022-10-06 14:27:58 -04:00
290acf6acc
Use compat mode when signing outgoing activities (fixes #1984) (#2473) 2022-10-03 13:46:42 -04:00
Dessalines
3f8c28b26f
Check to make sure comment isnt deleted / removed for unread count. (#2472)
- Fixes #2471
2022-09-29 20:52:14 +00:00
Dessalines
ee41654394
Dont show deleted users or communities on profile page. (#2450)
* Dont show deleted users or communities on profile page.

- Fixes #2448

* Fix missing communities

* Add include_deleted to resolve_actor_identifier.
2022-09-28 20:54:32 +00:00
Dessalines
ae95f5928e
Adding email admins for new applications. Fixes #2271 (#2390)
* Adding email admins for new applications. Fixes #2271

* Fix error.

Co-authored-by: Nutomic <me@nutomic.com>
2022-09-27 12:48:44 -04:00
Dessalines
0aeb78b8f3
Showing # of unread comments for posts. Fixes #2134 (#2393)
* Showing # of unread comments for posts. Fixes #2134

* Fix lint.

* Forgot to remove comment list update.

* Fix clippy
2022-09-27 16:45:46 +00:00
f2537ba7db
Convert emails to lowercase (fixes #2462) (#2463) 2022-09-27 12:02:04 -04:00
Dessalines
3c5368d8b1
Remove unnecessary show_deleted_and_removed comments for a profile. (#2458) 2022-09-26 20:02:06 +00:00
Dessalines
2dca80d678
Remove pointless language joins. (#2451)
* Remove pointless language joins.

* Fix test
2022-09-26 15:25:18 +00:00
Dessalines
3adb293541
Fix rate limit error messages. Fixes #2428 (#2449)
* Fix rate limit error messages. Fixes #2428

* Simplify
2022-09-26 10:40:42 -04:00
Dessalines
9ce15ed071
Fix missing local user from post queries. (#2447) 2022-09-26 10:39:22 -04:00
Dessalines
c9f1407429
Diesel 2.0.0 upgrade (#2452)
* Initial commit to bump diesel to 2.0.0-rc.0 and see what happens

* Add chrono feature from diesel

* db_schema crate is close to building?

* Upgrade diesel-derive-newtype

* Mostly modifying references to connections to be mutable ones; also used
new way to do migrations as suggested by the migration guide; a lot more
compiles now, though I can't figure out this tricky ToSql issue at the
moment

* Running clippy --fix

* Trying to fix drone clippy 1

* Fix clippy

* Upgrade clux-musl

* Trying to fix drone clippy 2

* Trying to fix drone clippy 3

* Trying to fix drone clippy 5

* Adding diesel table aliases, removing sql view hack. Fixes #2101

Co-authored-by: Steven Chu <stevenc1@gmail.com>
Co-authored-by: Nutomic <me@nutomic.com>
2022-09-26 14:09:32 +00:00
kartikynwa
4e6409f325
Allow filtering out of deleted and removed comments when getting person details (#2446)
undefined
2022-09-20 21:33:33 -04:00
004efd5d94
Implement reports for private messages (#2433)
* Implement reports for private messages

* finish private message report view + test

* implement api for pm reports

* merge list report api calls into one, move report count to site

* fix compile error

* Revert "merge list report api calls into one, move report count to site"

This reverts commit 3bf3b06a705c6bcf2bf20d07e2819b81298790f3.

* add websocket messages for pm report created/resolved

* remove private_message_report_view

* add joinable private_message_report -> person_alias_1

* Address review comments
2022-09-19 22:58:42 +00:00
Dessalines
09246a20fb
Check for slurs in account creation. (#2443) 2022-09-19 19:42:42 +00:00
Dessalines
a93095ed3f
The language id is crucial for front ends. (#2437) 2022-09-13 21:02:37 +00:00
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
0a14b17747 fix clippy 2022-09-02 10:49:54 -04:00
3295784ebb dont set default user languages in api code (already done in db) 2022-09-02 10:49:54 -04:00
5e8a37ac86 clippy fixes 2022-09-02 10:49:54 -04:00
d058e2217a api changes for comment language tagging 2022-09-02 10:49:54 -04:00
bc7450ae3e add test for comment view languages 2022-09-02 10:49:54 -04:00
f5b1ee6c34 fix tests 2022-09-02 10:49:54 -04:00
3d0d8796ad Add language tags for comments 2022-09-02 10:49:54 -04:00
a6dc6804aa
Pass LocalUser to PostQuery etc, instead of separate params (#2413) 2022-08-19 10:27:39 -04:00
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
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
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
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
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
becb8b4f66
Update apub examples to remove to field (ref #2380) (#2382) 2022-07-29 13:30:38 -04:00
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
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
b9f1fc0518
Fix panics in search_by_apub_id() (fixes #2371) (#2373) 2022-07-27 17:03:44 -04:00
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
16fe149a6d
Change config pictrs key name (#2360) 2022-07-14 14:25:10 -04:00
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
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
3ef812660c
Dont allow blocking admin (#2340) 2022-07-05 23:02:54 +00:00
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
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
dc35ab9c2b
Use correct url for activitystreams protocol context (#2326) 2022-06-21 15:27:10 -04:00
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
fcaf7a084c
Upgrade activitypub_federation to 0.2.0, add setting federation.debug (#2300) 2022-06-08 11:45:39 -04:00
7bc2f9fd6d
Remove unused setup config vars (#2302) 2022-06-08 11:44:53 -04:00
c050945b1f
Add pub use for db crates in api_common (#2305) 2022-06-08 11:30:20 -04:00
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
780832256c
Remove unused cargo.toml files (#2293) 2022-06-03 15:56:33 +00:00
5387c262c1
Forbid outgoing requests in activitypub tests (fixes #2289) (#2294) 2022-06-03 11:31:22 -04:00
339eab01fd
Embed Peertube videos (#2261)
* Use og:video attribute for embeds, change Post.embed_html to embed_url

* fix clippy
2022-06-02 21:44:47 +00:00
9a458d2e4b
Run cargo check for each crate with different features (ref #2284) (#2292) 2022-06-02 18:19:53 +00:00
13ca1111c4
Remove 0.15 federation compat code (#2131) 2022-06-02 13:48:53 -04:00
a2a594b763
Extract Activitypub logic into separate library (#2288)
* Create example for apub lib

* some rewriting of apub lib

* Add LocalInstance struct for apub lib to avoid using Lemmy Settings

* Move ActorType trait to lemmy_apub, because its not needed in library

* Use reqwest_retry instead of custom impl, dont specify timeout on every send()

* Some improvements to example

* Moved inbox handling to library

* bug fixes

* Move context and serde helpers into library

* wip: example changes

* Add lemmy_utils feature to build only LemmyError

* Rename to activitypub_federation

* Remove lemmy_utils dep from activitypub_federation using generic error type

* Finish activitypub example

* Cleanup and fix tests

* Reorganize library files

* Remove ApubObject.to_tombstone()

* Extract activitypub library into separate git repository
2022-06-02 16:33:41 +02:00
1bd57ee5ca Version 0.16.5 2022-05-30 18:32:31 -04:00
69106589ba Fix publish 2022-05-26 16:10:36 -04:00
Dessalines
eafb3869f2
Revert "Add pending, and change use specific API response for FollowCommunity…" (#2283) 2022-05-26 11:17:04 -04:00
3c111b3062 Dropping default on pending column. 2022-05-20 16:15:14 +00:00
d4ee171b08 Making community_follower.pending column not null. 2022-05-20 16:15:14 +00:00
763dc9668c Fix formatting. 2022-05-20 16:15:14 +00:00
e6fe9d0325 Fixing unfollow 2022-05-20 16:15:14 +00:00
48f5a2ee5e Add pending, and change use specific API response for FollowCommunity. Fixes #2246 2022-05-20 16:15:14 +00:00
9ef0efa420
Add legal information (fixes #721) (#2273) 2022-05-19 20:32:40 +00:00
426e1b1e51 Update image crate 2022-05-17 13:48:47 -04:00
562b88da9e Remove youtube metadata test 2022-05-17 16:26:36 +02:00
5eb0dfdc73 Fixing malformed rosetta translations. Fixes #2231 2022-05-13 12:24:29 -04:00
f0ec3015cd
Remove check that avatars/banners are locally hosted (fixes #2254) (#2255) 2022-05-10 17:08:13 +00:00
Paolo Barbolini
ef12cd9588
Bump lettre to 0.10.0-rc.6 (#2250) 2022-05-09 23:08:13 +00:00
Paolo Barbolini
559e43075a
Simplify building plain/html emails (#2251) 2022-05-08 17:00:12 +00:00
7b86441bab
Federate with Peertube (#2244) 2022-05-06 23:53:33 +00:00
3053e14be7
Derive default for api request structs, move type enums (#2245)
* Derive default for api request structs, move type enums

* Simplify api by using enum types directly, instead of string

* Add default and clone for most api structs
2022-05-06 20:55:07 +00:00
3aa3d75a1e
Add cargo feature for building lemmy_api_common with mininum deps (#2243) 2022-05-03 17:44:13 +00:00
dd5835fb6e
Add restricted community field to CreateCommunity, UpdateCommunity (ref #2235) (#2242) 2022-04-29 14:01:10 +00:00
7058cfa1cf
Implement restricted community (only mods can post) (fixes #187) (#2235)
* Implement restricted community (only mods can post) (fixes #187)

* review fixes

* fix tests
2022-04-28 20:32:32 +00:00
c718882479
Accept comments with hashtags from Friendica (#2236) 2022-04-27 16:12:13 +00:00
2e01e8e42c
Remove unused dependencies (#2239) 2022-04-27 17:56:05 +02:00
56b7030901
Fix link metadata unit test (#2237) 2022-04-27 15:42:10 +00:00
3488b9aeb5
Dont return "admin" for GET user when no id/name is provided (fixes #1546) (#2233) 2022-04-25 21:16:29 +00:00
ae84258c41
Federation: dont overwrite local object from Announce activity (#2232)
* Federation: dont overwrite local object from Announce activity (fixes #2143)

* add missing form fields

* refactoring

* add ap_id, updated fields

* fix
2022-04-25 21:11:34 +00:00
00b0b26dfa
Add default post listing type (fixes #2195) (#2209)
* Add default post listing type (fixes #2195)

* review fixes

* change column type
2022-04-19 19:05:08 +00:00
Dessalines
24be9f2cd5
Show deny reason to users after a failed login. Fixes #2191 (#2206)
* Show deny reason to users after a failed login. Fixes #2191

* Updating translations.

* Adding registration_denied translated string.
2022-04-19 10:48:59 +00:00
Dessalines
0a36b16e29
Fix allowlist / blocklist description location. Fixes #2214 (#2215)
* Fix allowlist / blocklist description location. Fixes #2214

* Fix allowlist check
2022-04-13 18:27:56 +00:00
3951a16447
Split apart api files (#2216) 2022-04-13 18:12:25 +00:00
e0381df88a
Expose remote site info in GetCommunity API (fixes #2208) (#2210)
* Expose remote site info in GetCommunity API (fixes #2208)

* use instance_actor_id_from_url()
2022-04-13 16:37:54 +00:00
Dessalines
3d8709780a
Fixing unstable post sorts. Fixes #2188 (#2204) 2022-04-13 15:33:38 +00:00
bbd739af9b
Change Person, Instance types (#2200) 2022-04-12 17:10:35 +00:00
b47a474863
Merge branch 'main' into clippy_fix_2 2022-04-12 10:03:40 +00:00
fed73a72c1
Write mod log for federated sticky/lock post actions (#2203) 2022-04-11 23:03:31 +00:00
0bcdfa8be4 Clippy fixes. 2022-04-11 18:51:11 -04:00
c232564fda Version 0.16.3 2022-04-08 10:20:31 -04:00
4878848955 Version 0.16.3-rc.1 2022-04-08 09:17:00 -04:00
4052900d30 Updating translations 2022-04-08 09:13:46 -04:00
8337eaefdd
Federate user account deletion (fixes #1284) (#2199) 2022-04-07 20:52:17 +00:00
9ac1f46a2b
Dont federate initial upvote (#2196) 2022-04-07 20:46:10 +00:00
f9d563d80a
Add missing mod log entries for federated actions (fixes #1489) (#2198) 2022-04-07 20:44:28 +00:00
37c834725c Make sure application questionaire is required. Fixes #2189
Also fix local image domain check. Was failing for blank strings /
replaces.
2022-04-04 20:58:50 +00:00
65cac21713
Fix verify_mod_action check for remote admin actions (#2190)
* Fix verify_mod_action check for remote admin actions

* fix federation test
2022-04-04 14:46:49 +00:00
c7f5337099
Run cargo upgrade (#2176)
* Run cargo upgrade and cargo update

* Fixing validation (#2179)

Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
2022-04-01 18:37:51 +00:00
bfae246734
Migrate towards using page.attachment field for url (ref #2144) (#2182) 2022-04-01 18:25:19 +00:00
56b275acd4
Exclude removed/deleted posts from community outbox (#2184) 2022-04-01 18:18:25 +00:00
589d952a95
Fetch community outbox in parallel (fixes #2180) (#2181) 2022-04-01 18:06:23 +00:00
4cf0da7b60 Clippy fixes. 2022-03-30 10:58:03 -04:00
ad7e6d99ed
Add email translations (#2175) 2022-03-29 18:23:03 +00:00
d5a213760d Version 0.16.2 2022-03-29 12:56:21 -04:00
f7fa1f10f9 Updating translations. 2022-03-29 12:07:39 -04:00
7bb8069224 Version 0.16.2-rc.3 2022-03-29 11:54:13 -04:00
610120067c
Add test files for Friendica federation (fixes #2144) (#2167) 2022-03-29 15:48:29 +00:00
Dessalines
e16821116e
Lowering search rate limit. Fixes #2153 (#2154)
* Lowering search rate limit. Fixes #2153

* Adding a search rate limit.

* Forgot to add the websocket search rate limit

* Fix wrong op
2022-03-29 15:46:03 +00:00
Dessalines
d49565e030
Rate limit ws joins (#2171)
* Removing async on mutex lock fn.

* Removing redundant ip

* Don't check rate limit twice.
2022-03-28 20:31:35 +00:00
a11b5b107d Version 0.16.2-rc.2 2022-03-26 21:37:12 -04:00
Dessalines
f2a0841586
Rate limit websocket joins. (#2165)
* Rate limit websocket joins.

* Removing async on mutex lock fn.

* Removing redundant ip

* Return early if check fails.
2022-03-27 00:29:05 +00:00
a5ff629b24
Dont log errors when rate limit is hit (fixes #2157) (#2161)
* Dont log errors when rate limit is hit (fixes #2157)

* Clone service rather than http request

* some cleanup/refactoring

Co-authored-by: Aode (Lion) <asonix@asonix.dog>
2022-03-25 16:41:38 +01:00
c681bb79b1 Version 0.16.2-rc.1 2022-03-24 18:25:21 -04:00
2da0684e95 Removing check_only 2022-03-24 16:29:08 -04:00
ed9f70276d Fix rate limit check for register. Fixes #2159 2022-03-24 16:13:58 -04:00
dfb0938738
GNU social compatibility (#2100)
* Use SourceCompat everywhere (better compat with other software)

* Name field should not be mandatory in Group

* also check page.cc field for community id

* add gnu social tests

* better to use option<sourcecompat>

* update gnu social tests, marked vote as "unlisted"
2022-03-24 16:33:42 +00:00
Dessalines
1e9f609cdb
Consolidate and lower reqwest timeouts. Fixes #2150 (#2151) 2022-03-24 16:33:23 +00:00
83e996111e
Check that config is valid before saving (#2152) 2022-03-24 16:23:12 +00:00
b406342a14
Dont log error if duplicate activity is received (fixes #2146) (#2148) 2022-03-24 16:05:27 +00:00
cb44b14717
WIP: Email localization (fixes #500) (#2053)
* Allow email localization (fixes #500)

* add PersonAggregates::default()

* add lemmy-translations submodule

* fix gitmodules
2022-03-24 15:25:51 +00:00
8112816e99
If viewed actor isnt in db, fetch it from other instance (#2145) 2022-03-23 21:27:51 +00:00
4e6d901649 Show rate limit algorithm. Fixes #2136 2022-03-22 18:45:14 +00:00
a10bf7d410
Adjust retry interval for sending activities (#2141) 2022-03-22 18:40:40 +00:00
bcf7ec6109
Forbid remote URLs for avatars/banners (fixes #1618) (#2132) 2022-03-18 15:46:58 +00:00
166ec196b0
Rework error handling (fixes #1714) (#2135) 2022-03-16 20:11:49 +00:00
514e2301b5 Version 0.16.1 2022-03-15 17:23:16 -04:00
9fd6a48e3c Version 0.16.1-rc.1 2022-03-15 16:52:37 -04:00
7d61616dff
Revert "Add logging to debug federation issues (ref #2096) (#2099)" (#2130)
This reverts commit e094989a4c.
2022-03-14 20:18:19 +00:00
550a93aed9
Dont allow admin to add mod to remote community (#2129) 2022-03-14 18:35:57 +00:00
f8fb3b41f0
Reject federated downvotes if downvotes are disabled (fixes #2124) (#2128) 2022-03-14 18:20:18 +00:00
05f20da51f Version 0.16.0 2022-03-08 13:45:01 -05:00
82dec1911f Version 0.16.0-rc.4 2022-03-08 08:57:57 -05:00
660efd1549
Correctly read local SiteView (#2122) 2022-03-08 12:52:33 +00:00
15ff832c4a Version 0.16.0-rc.3 2022-03-07 18:59:29 -05:00
3c5275638f
Increase default worker count (#2120) 2022-03-07 22:28:50 +00:00
Dessalines
ffd2ba5d90
Fix community rss. Fixes #2116 (#2119)
Co-authored-by: Nutomic <me@nutomic.com>
2022-03-07 21:49:02 +00:00
fbadb2d7bd
Try to fix federation test on ci (#2121) 2022-03-07 21:25:34 +00:00
aef2abb962 Version 0.16.0-rc.2 2022-03-03 14:40:09 -05:00
df757f28b4
Make delete activities backwards compatible with 0.15 (#2114) 2022-03-03 19:37:12 +00:00
ef1e164cc5
Make activity queue worker count configurable, log stats (#2113) 2022-03-03 18:54:33 +00:00
fa29ffade1
Add timeout for sending activities (#2112)
* Add timeout for sending activities

* Also set request timeouts in utils/src/request.rs
2022-03-03 13:40:10 -05:00
a5433ebf77 Fixing unit tests. 2022-03-03 12:51:55 -05:00
Rob Ede
e3153df74d
Remove direct actix-http dependency 2022-03-02 18:11:05 +00:00
Rob Ede
b06f3eb32e
Update actix-* dependencies to stable v4. 2022-03-02 18:00:52 +00:00
1b5037e92d Version 0.16.0-rc.1 2022-03-02 12:41:11 -05:00
dayinjing
bc3927a9bd
Show nsfw communities if you are logged in and searching communities (#2105)
* Show nsfw communities in logged in and you've enabled nsfw in your profile atleast

* Reuse existing user check

Co-authored-by: Sun Wukong <monkey@king.com>
2022-03-02 17:39:27 +00:00
63565712ad
Fix resending activities (fixes #1282) (#2109) 2022-03-01 13:40:05 -05:00
fb4c47d602
Dont hardcode site id in Site::update (#2110) 2022-03-01 17:01:23 +00:00
RedLobster999
348077c3de
send plain-text in email along with html (#2107)
* send plain text in email along with html

* format the code using "cargo +nightly fmt"

Co-authored-by: kittiphat-kang <kittiphat.nu@easysunday.com>
2022-03-01 14:28:18 +00:00
9f5183fe98
Add site option for default theme (#2104) 2022-02-23 11:40:36 -05:00
dayinjing
7f9b55e793
Hide community v2 (#2055)
* Initial working of hiding communities and adding a db entry for mod log

* Return mod log for hidden communities

* Clean up hidding communities PR

* use lower case like other migration files

* Formatting fix

* pass in admin id to list, make match logic the same in post_view as community_view. Dont force non null for reason

* Clean PR review stuff

* Change person_id to mod_person_id on hide community table

* Make bools optional, add a space for formating

Co-authored-by: Thor Odinson <odinson@asgard.com>
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
2022-02-18 02:30:47 +00:00
762b85b27e
Reorganize federation tests (#2092)
* Reorganize apub protocol tests

* Reorder apub protocol struct members to clarify mandatory/optional fields
2022-02-17 22:04:01 +00:00
e094989a4c
Add logging to debug federation issues (ref #2096) (#2099) 2022-02-17 18:48:45 +00:00
5a8c894359
Upgrade to Rust 2021 edition (#2093)
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
2022-02-14 15:34:54 +00:00
788924d7ff
Merge different delete activities for better compatibility (fixes #2066) (#2073) 2022-02-14 10:14:24 -05:00
dd865c5af5
Implement instance actor (#1798)
* Implement instance actor

* wip: make site bans federate

* finish implementation and unit tests for federated bans

* start adding api tests

* fix api test

* remve site from GetCommunityResponse

* only federate site bans originating from user's home instance

* dont expose site.private_key in api
2022-02-07 19:23:12 +00:00
f1aef63149
Use doku(skip) for opentelemetry_url config value (ref #2085) (#2091) 2022-02-07 10:39:37 -05:00
1546e5fd0d Merge remote-tracking branch 'lemmynet/fix_sitemetadata_test' into asonix/document-opentelemetry-url 2022-02-04 20:37:38 -06:00
609d2b99f7 Fix site metadata test. 2022-02-04 18:22:43 -05:00
6058b11f6e Add comment about opentelemetry_url 2022-02-03 17:24:19 -06:00
Dessalines
6b1894faf0
Alpha-ordering community follows. Fixes #2062 (#2079) 2022-02-01 20:00:54 +00:00
545fe8d0dd
Add federation tests for Friendica, improve parsing of source field (fixes #2057) (#2070) 2022-01-28 16:47:34 -05:00
4a23ee4d8b
Dont make webfinger request when viewing community/user profile (fixes #1896) (#2049) 2022-01-27 16:39:22 +00:00
Dessalines
d83a53e905
Fixing private instance check. Fixes #2064 (#2065) 2022-01-27 16:25:22 +00:00
Kradyz
1c5c02e1bf
Case-insensitive username at login (#2010)
* Case-insensitive username at login

* formatting

Co-authored-by: Kradyz <k@radiz.nl>
2022-01-26 18:05:07 +00:00
Dessalines
e36ad9d984
Removing the site creator, adding leave_admin. Fixes #1808 (#2052)
* Removing the site creator, adding leave_admin. Fixes #1808

* Making sure there's at least one admin. Fixing unit tests
2022-01-26 17:57:16 +00:00
Dessalines
1372827b41
Adding starttls support. Fixes #1997 (#2051)
* Adding starttls support. Fixes #1997

* Change name to tls_type, make a string
2022-01-26 16:42:43 +00:00
2544341e47
Put community last in webfinger response (fixes #2037) (#2047) 2022-01-21 21:00:17 +00:00
16f98261f8
Dont check for ban in MarkCommentAsRead (fixes #2045) (#2054) 2022-01-21 14:46:43 -05:00
Dessalines
16271b0a4c
Empty post bodies (#2050)
* Cleaning optional post bodies. Fixes #2039

* Only trim once.

* Using .map() instead.

* Revert "Using .map() instead."

This reverts commit a2f4907209.
2022-01-21 13:38:01 +00:00