Commit graph

65 commits

Author SHA1 Message Date
Luna e06cd9c0ac
mark parent as read on reply (#1819)
* mark parent as read on reply

* mark as read only if you are the recipient

* mark mentions as read on reply
2021-10-08 10:28:32 -04:00
Dessalines 8708ad1b44 Moving settings and secrets to context. 2021-09-27 11:25:26 +02:00
Nutomic 527eefbe92
Rewrite fetcher (#1792)
* Use new fetcher implementation for post/comment

* rewrite person fetch to use new fetcher

* rewrite community to use new fetcher

* rename new_fetcher to dereference_object_id

* make ObjectId a newtype

* handle deletion in new fetcher

* rewrite apub object search to be generic

* move upsert() method out of ApubObject trait

* simplify ObjectId::new (and fix clippy)
2021-09-25 11:44:52 -04:00
Dessalines 0940fb5f00
Fixing some comment websocket issues. (#1768)
- Wasn't correctly getting comment parent user for mark as read. Fixes #1767
- Was using all recipients for simple comment return. Fixes #1766
2021-09-04 08:47:41 -04:00
Dessalines 2016afc9db
User / community blocking. Fixes #426 (#1604)
* A first pass at user / community blocking. #426

* Adding unit tests for person and community block.

* Moving migration

* Fixing creator_blocked for comment queries, added tests.

* Don't let a person block themselves

* Fix post creator_blocked

* Adding creator_blocked to PersonMentionView

* Moving blocked and follows to MyUserInfo

* Rename to local_user_view

* Add moderates to MyUserInfo

* Adding BlockCommunityResponse

* Fixing name, and check_person_block

* Fixing tests.

* Using type in Blockable trait.

* Changing recipient to target, adding unfollow to block action.
2021-08-19 20:54:15 +00:00
Nutomic 28d6370c35
Rewrite delete activities (#1699)
* Limit type/method visibility in apub code

* Simplify db_queries traits by removing generics

* Simplify delete activity implementation

* Rewrite delete activities

* Implement helper functions for websocket message sending

* When receiving delete reason as empty string, change to none
2021-08-17 14:04:58 -04:00
Nutomic b8d7f00d58
Rewrite voting (#1685)
* Merge like/dislike activity handlers into vote

* Rewrite vote sending code

* Remove old send_create, send_update functions
2021-08-02 16:33:40 -04:00
Felix Ableitner dc363c8f35 Merge logic for post create and update 2021-07-31 19:26:17 +02:00
Felix Ableitner 3eb46868ff Merge logic for comment create and update 2021-07-31 17:47:08 +02:00
Felix Ableitner 43ad99bbe8 Rewrite apub comment (de)serialization using structs (ref #1657) 2021-07-31 16:57:37 +02:00
Dessalines f54209c451
Running clippy --fix (#1647) 2021-07-05 16:07:26 +00:00
Nutomic 65a11a7239
Use .map_err in api code (fixes #1573) (#1575)
* Use .map_err in api code (fixes #1573)

* forgot some
2021-04-16 09:10:43 -04:00
Dessalines 4c8f2e976e Merge remote-tracking branch 'yerba/split-api-crate' into test_merge_api_crates_reorg 2021-03-29 16:24:50 -04:00
Felix Ableitner 01fc1228d5 Fix API and clippy warnings 2021-03-29 20:55:08 +02:00
Felix Ableitner 249fcc5066 Split api crate into api_structs and api 2021-03-25 20:19:40 +01:00