Commit Graph

40 Commits

Author SHA1 Message Date
Felix Ableitner 95e30f0e08 Split up lemmy_db_views, put lemmy_rate_limit into lemmy_utils 2020-12-22 00:34:54 +01:00
Felix Ableitner d5efebbf47 Split lemmy_db into lemmy_db_queries, lemmy_db_aggregates and lemmy_db_views 2020-12-21 17:39:11 +01:00
Dessalines 1a0d1f64f0 Merge remote-tracking branch 'origin/split-db-workspace' into move_views_to_diesel_split 2020-12-21 09:28:20 -05:00
Felix Ableitner 5231666465 Move remaining structs from lemmy_db::source to lemmy_db_schema 2020-12-21 14:38:34 +01:00
Felix Ableitner a7e231b35b Move community to lemmy_db_schema 2020-12-21 13:28:12 +01:00
Dessalines e25436576a Fixing some clippy warnings. 2020-12-20 23:00:33 -05:00
Felix Ableitner f842bbff8d Move user to lemmy_db_schema, create traits for impls 2020-12-18 19:38:32 +01:00
Felix Ableitner 114f3cbfb5 Move comment, post definitions into lemmy_db_schema 2020-12-18 18:27:25 +01:00
Dessalines 313f0467c8 Adding moderator views. 2020-12-16 16:28:18 -05:00
Dessalines f456f5da46 Re-organizing source tables into a different folder. 2020-12-13 12:04:42 -05:00
Dessalines 46e38bf714 Merge branch 'main' into move_views_to_diesel 2020-12-08 13:17:55 -05:00
Nutomic 9cc1cfc973
Apub local object handling (#1297)
* Limit visibility of some traits and methods

* WIP: alternative way to handle non-local object parsing

* finish this

* cleanup

* Move check for locked post into Comment::from_apub()

* Mark user as updated after fetching

* Should set last_refreshed_at, not updated

* Add ApubObject trait in DB, with method read_from_apub_id()

* Create shared, generic implementation for `FromApub`, prefer local data

* Check for community ban when parsing post/comment (fixes #1287)

* Fix tests (changes in get_object_from_apub() prevented `Update` from working)

* Support parsing `like.object` either as URL or object

* Send out like.object as URL, instead of full object (fixes #1283)

* add todo
2020-12-08 12:38:48 -05:00
Dessalines 36f7b20784 Removing old communityviews 2020-12-06 09:12:51 -05:00
Dessalines 7731479607 Adding SiteAggregates. 2020-12-02 22:39:31 -05:00
nutomic 2b5c69d678 Add check to make sure that inbox doesnt receive local activities (ref #1283) (#147)
Fixed comparison

Add check to make sure that inbox doesnt receive local activities (ref #1283)

Co-authored-by: Felix Ableitner <me@nutomic.com>
Reviewed-on: https://yerbamate.ml/LemmyNet/lemmy/pulls/147
2020-12-01 18:30:15 +00:00
Felix Ableitner 14bf45d099 Dont handle activities twice in inbox 2020-11-16 21:43:52 +01:00
Felix Ableitner fb16f47f2f Add user_inbox check that activities are really addressed to local users 2020-11-11 17:40:45 +01:00
Felix Ableitner 06e82fe761 Add pending status for federated follows 2020-11-10 16:45:10 +01:00
dessalines 94dd335fac Merge pull request 'Enforce post lock in federation inbox' (#129) from enforce-post-lock into main
Reviewed-on: https://yerbamate.ml/LemmyNet/lemmy/pulls/129
2020-11-10 13:16:13 +00:00
Felix Ableitner e1fd614dd1 Fixed bug where comments with mentions were treated as private message 2020-11-09 19:18:23 +01:00
Felix Ableitner 8803e7834f Enforce site and community bans for federated users 2020-11-09 15:29:36 +01:00
Felix Ableitner b469b6d8d3 Separate logic for user and community inbox
more refactoring with tons of changes:

- inbox functions return LemmyError instead of HttpResponse
- announce is done directly in community inbox
- reorganized functions for handling inbox activities
- additional checks for private messages
- moved inbox handler functions for post, comment, vote into separete file
- ensure that posts, comments etc are addressed to public (ref #1220)
- probably more
2020-11-09 13:42:08 +01:00
nutomic 7c51a36012 In activity table, remove `user_id` and add `sensitive` (#127)
Forgot to add migrations

Add `sensitive` column to activities table, so PMs arent served over HTTP

Remove user_id column from actvity table

Co-authored-by: Felix Ableitner <me@nutomic.com>
Reviewed-on: https://yerbamate.ml/LemmyNet/lemmy/pulls/127
2020-11-06 13:06:47 +00:00
Felix Ableitner 6d17d5ead2 Ignore incoming activities which have been received before (ref #1220) 2020-10-23 14:29:56 +02:00
Felix Ableitner 3d5647b16f Limit amount of HTTP requests to handle activities (fixes #1221) 2020-10-22 20:27:32 +02:00
Felix Ableitner 1a3b96b054 Organise activity receive files by object type, not by activity type 2020-10-21 19:37:50 +02:00
Felix Ableitner 695272f980 Create rustdoc for activitypub code 2020-10-19 16:29:35 +02:00
Felix Ableitner fe15ff3c51 Also verify activity domains in shared inbox (fixes #1196) 2020-10-15 15:38:49 +02:00
Felix Ableitner 39cbe5f31f Add method verify_activity_domains_valid() (ref #1196) 2020-10-15 15:38:03 +02:00
Felix Ableitner 3f9ede79ed Add domain checks for private message inbox 2020-10-13 18:06:26 +02:00
Felix Ableitner ac0cd7bc68 Dont include full objects with remove/delete activities 2020-10-13 17:47:05 +02:00
Felix Ableitner 7cfcf0acec Change the way that `to` is set in apub 2020-10-12 18:02:28 +02:00
Felix Ableitner 0dda2577e1 Refactor apub code, split up large files 2020-10-12 16:10:09 +02:00
Felix Ableitner c90c96fbf6 Respect disable downvotes setting when federating 2020-10-09 15:41:40 +02:00
Dessalines 7fbad900d7 Addressing a few comments. 2020-10-08 12:38:44 -05:00
Dessalines c08d891742 Merge branch 'main' into no_conflict_triggers 2020-10-07 20:57:29 -05:00
Felix Ableitner 60730e81d9 Avoid duplicate comment send, better activity logging 2020-10-06 18:28:31 +02:00
Dessalines 2e2b6eacd7 Fixing pretty print again. 2020-10-02 10:15:26 -05:00
Felix Ableitner 15adc21e1f Only search locally for Community::read_from_name and similar (ref #698) 2020-10-02 14:18:20 +02:00
nutomic 442369a041 Move websocket code into workspace (#107)
Adjust dockerfiles, fix cargo.toml and remove unused deps

Merge branch 'main' into move-websocket-to-workspace

Move api code into workspace

Move apub to separate workspace

Move websocket code into separate workspace

Some code cleanup

Remove websocket dependency on API

Co-authored-by: Felix Ableitner <me@nutomic.com>
Reviewed-on: https://yerbamate.dev/LemmyNet/lemmy/pulls/107
2020-09-24 13:53:21 +00:00