Commit Graph

137 Commits

Author SHA1 Message Date
Dessalines
f4565d0603
Remove materialized views. (#908)
* One pass at materialized views, only about 30% faster, not good.

* Before merging master to test out bans.

* DB Rework working, still need more testing.

* Fixing accidental addadmin bug from asonix async merge.

* Fixing the comment delete trigger

* Some more DB additions.

- Adding a hot_rank desc, published desc index to post_aggregates_fast.
- Removed WITH CTE queries in favor of direct selects (since CTEs cant
  use indexes)

* Removing some unecessary indexes.

* Some more DB optimizings

- Changing the fast_id pkeys to just ids on the fast tables.
- Removing the private_message_fast, since the view contains no aggregates.
- Comment and post voting now no longer pull from the views, they update the counts directly.

* Adding community_agg_view and post_agg_views Credit: eiknat.

* Adding user and comment_view migrations. (comment_view still broken)

* Adding more views. Credit Eiknat.
2020-07-07 10:54:44 -04:00
Dessalines
cd007febef Merge branch 'master' into federation 2020-07-01 09:04:26 -04:00
Riley
a074564458
Federation async (#848)
* Asyncify more

* I guess these changed

* Clean PR a bit

* Convert more away from failure error

* config changes for testing federation

* It was DNS

So actix-web's client relies on TRust DNS Resolver to figure out
where to send data, but TRust DNS Resolver seems to not play nice
with docker, which expressed itself as not resolving the name to
an IP address _the first time_ when making a request. The fix was
literally to make the request again (which I limited to 3 times
total, and not exceeding the request timeout in total)

* Only retry for connecterror

Since TRust DNS Resolver was causing ConnectError::Timeout,
this change limits the retry to only this error, returning
immediately for any other error

* Use http sig norm 0.4.0-alpha for actix-web 3.0 support

* Blocking function, retry http requests

* cargo +nightly fmt

* Only create one pictrs dir

* Don't yarn build

* cargo +nightly fmt
2020-07-01 08:54:29 -04:00
Dessalines
c239a5f0e5 Fixing ban user bug. Fixes #876 2020-07-01 08:22:41 -04:00
Dessalines
86dc50f9f0 Some fixes to federation.
- Advanced code migrations now disable then re-enable triggers.
  Brings run time down to < 15 seconds, no need to thread them.
- Changing ap_ids and actor_ids in migrations to a fake url,
  so it doesn't break XsdAnyUri in activitystreams.
2020-06-26 21:12:41 -04:00
Dessalines
dc94e58cbf Merge branch 'master' into federation_merge_from_master_2 2020-06-23 21:11:38 -04:00
Dessalines
96c9f801a9 Merge branch 'master' of https://github.com/makigi-io/makigi into makigi-io-master 2020-06-22 14:52:46 -04:00
Ernest
8e1e9a521a Edit community name validation, translations #823 2020-06-22 09:23:54 +02:00
Ernest
4247df4295 Community name validation 2020-06-20 11:33:23 +02:00
Dessalines
4cf1f080bf Adding delete picture via pict-rs delete tokens. Fixes #505 2020-06-10 22:47:06 -04:00
Dessalines
2fbd44c59d Adding pictrs thumbnail caching for urls and embeds. 2020-06-10 18:22:57 -04:00
Felix Ableitner
0f1a8ec928 Merge branch 'master' into federation 2020-06-09 14:01:26 +02:00
Felix Ableitner
52206998aa more fixes 2020-05-30 15:38:01 +02:00
Felix Ableitner
d6e2119277 make comments work (more or less) 2020-05-28 20:09:37 +02:00
Dessalines
29fc3681b9
Validate register usernames on the back-end. Fixes #716 (#750)
* Validate register usernames on the back-end. Fixes #716

* Changing name to is_valid_username
2020-05-28 14:07:36 -04:00
Dessalines
f15c3b4e1e Merge branch 'yerba_rework-imports' into federation 2020-05-16 21:09:26 -04:00
Felix
9e61c3be94 Rework imports 2020-05-16 20:04:17 +02:00
Dessalines
940dc73f28 Federated mentions. Fixes #681 (#717)
* Federated mentions. Fixes #681

* Changing some todos, adding comments.
2020-05-15 12:36:11 -04:00
Dessalines
66142c546b Merge branch 'federated_private_messages' into federation 2020-05-06 13:51:39 -04:00
Dessalines
15f1920b25 Federated private messages. 2020-05-05 22:06:24 -04:00
Felix
dfd6629a6f Federate community category and nsfw 2020-05-05 16:30:13 +02:00
Felix
7485f1a5b4 Federate nsfw/locked info for posts 2020-05-05 02:09:27 +02:00
Dessalines
b177cbce1d Renaming ignore to unfollow in followable trait. 2020-05-04 14:26:16 -04:00
Dessalines
b8b2398d32 Adding undo follow community. 2020-05-03 22:41:45 -04:00
Dessalines
fab22e3d8a Add federated comment and post undo like. 2020-05-03 20:34:04 -04:00
Dessalines
a09c818746 Adding federated mod remove actions. 2020-05-03 10:00:59 -04:00
Dessalines
5366797a4b Add undos for delete community, post, and comment. 2020-05-01 15:01:29 -04:00
Dessalines
2f1cd9976d Adding federated community, comment, and post deletes.
- Unit tests added too.
- No undeletes working yet.
2020-05-01 10:07:38 -04:00
Felix
c43f06124a Address comments, implement delete for posts and comments 2020-04-29 16:51:25 +02:00
Felix
0c0c683986 Implement deleting communities 2020-04-28 19:46:25 +02:00
Dessalines
3b62f58dd2 Adding federated post and comment likes. 2020-04-28 00:16:02 -04:00
Dessalines
9721b77317 1/3rd done with post likes 2020-04-27 22:47:26 -04:00
Dessalines
70060c27b2 Adding activity table inserts. 2020-04-27 18:17:02 -04:00
Dessalines
22abbebd41 Lots of additions to federation.
- Added a shared inbox.
- Added federated comments, comment updates, and tests.
- Abstracted ap object sends into a common trait.
2020-04-27 12:57:00 -04:00
Dessalines
3ce0618362 Making a trait function for follow and accept. 2020-04-26 13:20:42 -04:00
Dessalines
66a2c4a2c3 Some fed fixes. 2020-04-24 10:04:36 -04:00
Dessalines
18e570b021 Merge branch 'master' into merge_master_2 2020-04-21 20:29:52 -04:00
Dessalines
d98c936295 Adding web::blocks to routes. 2020-04-21 16:40:03 -04:00
Dessalines
f0026065f5 Merge branch 'master' into federation_merge_from_master_1 2020-04-21 10:25:29 -04:00
asonix
ac43b86b60 Change RateLimit to act as a middleware 2020-04-19 22:59:07 -05:00
Dessalines
f300c67a4d Adding websocket notification system.
- HTTP and APUB clients can now send live updating messages to websocket
  clients
- Rate limiting now affects both HTTP and websockets
- Rate limiting / Websocket logic is now moved into the API Perform
  functions.
- TODO This broke getting current online users, but that will have to
  wait for the perform trait to be made async.
- Fixes #446
2020-04-19 18:08:25 -04:00
Felix
5284dc0c52 Simplify signing code 2020-04-19 13:44:44 +02:00
Felix
8daf72278d Add http signature to outgoing apub requests 2020-04-18 20:54:20 +02:00
Felix
86f172076b Implement search for activitypub IDs 2020-04-17 15:46:08 +02:00
Dessalines
fcf1c65fc1 Front end federation names and links for users, posts, and communities. 2020-04-14 19:18:13 -04:00
Dessalines
1336b4ed60 Merge branch 'dev' into federation 2020-04-14 16:07:20 -04:00
Dessalines
9878a58452 Fixing unwrap crash with site_view.rs 2020-04-14 12:24:05 -04:00
Felix
19c8461397 Implemented follow/accept 2020-04-14 17:37:23 +02:00
Felix
fdaf0b3364 Get inbox working properly 2020-04-13 15:06:41 +02:00
Dessalines
61815bce2e Adding live reloading of config.hjson changes through UI.
- https://stackoverflow.com/questions/61159698/update-re-initialize-a-var-defined-in-lazy-static/61161271#61161271
- https://stackoverflow.com/questions/29654927/how-do-i-assign-a-string-to-a-mutable-static-variable/47181804#47181804
2020-04-11 14:06:04 -04:00