Commit Graph

462 Commits

Author SHA1 Message Date
Kitaiti Makoto
917eda356d Use rocket_i18n on crates.io 2022-02-17 22:36:13 +09:00
dependabot[bot]
3afb724fed
Bump serde_json from 1.0.78 to 1.0.79
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.78 to 1.0.79.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.78...v1.0.79)

---
updated-dependencies:
- dependency-name: serde_json
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-14 19:32:32 +00:00
Kitaiti Makoto
28e0cdfe63 Remove activitystreams from dependencies 2022-02-08 16:50:00 +09:00
Kitaiti Makoto
54cbdb236f Add tests for Mention activity 2022-02-05 17:58:00 +09:00
Kitaiti Makoto
34c374de1a Attach icon field to User activity only whene it has avatar 2022-02-05 17:58:00 +09:00
Kitaiti Makoto
113722e4ba Add more ActivityPub tests for User 2022-02-05 17:58:00 +09:00
Kitaiti Makoto
3b429909f1 Extract User::outbox_collection_page() from outbox_collection() for testablity 2022-02-05 17:58:00 +09:00
Kitaiti Makoto
f1cdf4552f Extract User::outbox_collection() from outbox() for testablity 2022-02-05 17:58:00 +09:00
Kitaiti Makoto
7d320e57da Don't make medias::tests::clean() panic when file not found 2022-02-05 17:58:00 +09:00
Kitaiti Makoto
e1a598a459 Attach avater to sample user 2022-02-05 17:58:00 +09:00
Kitaiti Makoto
6107842303 Add tests for Comment::to_activity() and build_delete() 2022-02-05 17:58:00 +09:00
Kitaiti Makoto
65372d2018 Extract comments::tests::prepare_activity() 2022-02-05 17:58:00 +09:00
Kitaiti Makoto
4842385ca6 Add test about reply 2022-02-05 17:58:00 +09:00
Kitaiti Makoto
e8153d4b42 Fix Comment::to_activity() 2022-02-05 17:58:00 +09:00
Kitaiti Makoto
2087a659f9 Add test to validate comment json 2022-02-05 17:58:00 +09:00
Kitaiti Makoto
1770336c11 Make format_datetime() crate public 2022-02-05 17:58:00 +09:00
Kitaiti Makoto
9c177f6286 Change format_datetime implementation according to feature 2022-02-05 17:58:00 +09:00
Kitaiti Makoto
93a2c6d99f Add tests for Follow::build_accept() and build_undo() 2022-02-05 17:58:00 +09:00
Kitaiti Makoto
5ef76873b7 Fix tests 2022-02-05 17:58:00 +09:00
Kitaiti Makoto
b97c3fdb87 Extract Follow::build_accept 2022-02-05 17:58:00 +09:00
Kitaiti Makoto
64838ad864 Add test for Follow::to_activity() 2022-02-05 17:58:00 +09:00
Kitaiti Makoto
4df2ce5744 Add mention to test suite for Post activities 2022-02-05 17:58:00 +09:00
Kitaiti Makoto
c1f42836d9 Fix variable names 2022-02-05 17:58:00 +09:00
Kitaiti Makoto
0cbc9438d4 Complete a slash to Post Create activity's ID 2022-02-05 17:58:00 +09:00
Kitaiti Makoto
ca6cd534d8 Add tests for Post::to_activity(), create_activity() and update_activity() 2022-02-05 17:58:00 +09:00
Kitaiti Makoto
f529e803ef Fix ap_url of Reshare 2022-02-05 17:58:00 +09:00
Kitaiti Makoto
e5bc84badf Add tests for Reshare::to_activity and build_undo 2022-02-05 17:58:00 +09:00
Kitaiti Makoto
e2077bed59 Add test for Like::build_undo 2022-02-05 17:58:00 +09:00
Kitaiti Makoto
9ab9d29efb Remove double slashes 2022-02-05 17:58:00 +09:00
Kitaiti Makoto
5373a674e1 Add test for Like::to_activity 2022-02-05 17:58:00 +09:00
Kitaiti Makoto
d4a13a13d4 Add assert-json-diff to dev dependencies of plume-common
% cargo add assert-json-diff -p plume-models --dev
2022-02-05 17:58:00 +09:00
Kitaiti Makoto
80c0426768 Add activitystreams 0.7.0 to plume-models dependencies 2022-02-05 17:58:00 +09:00
dependabot[bot]
b1255efdcd
Bump tracing from 0.1.29 to 0.1.30
Bumps [tracing](https://github.com/tokio-rs/tracing) from 0.1.29 to 0.1.30.
- [Release notes](https://github.com/tokio-rs/tracing/releases)
- [Commits](https://github.com/tokio-rs/tracing/compare/tracing-0.1.29...tracing-0.1.30)

---
updated-dependencies:
- dependency-name: tracing
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-04 19:30:06 +00:00
Kitaiti Makoto
458d87fef1 Run migration 2022-01-30 01:16:51 +09:00
Kitaiti Makoto
996b161c1e Satisfy clippy 2022-01-27 11:45:35 +09:00
Kitaiti Makoto
45119d9a8c (cargo-release) version {{version}} 2022-01-12 10:42:45 +09:00
Kitaiti Makoto
b4395bce99 Implement request guard to detect enabled sign-up strategy 2022-01-12 08:39:33 +09:00
Kitaiti Makoto
c5c6b70a89 Upgrade ldap3 2022-01-07 06:17:58 +09:00
Kitaiti Makoto
88d7d54601 Upgrade whatlang 2022-01-07 06:05:20 +09:00
Kitaiti Makoto
0f0c896887 Upgrade itertools 2022-01-07 06:05:05 +09:00
Kitaiti Makoto
65233c0a9a Upgrade ammonia 2022-01-07 05:53:09 +09:00
Kitaiti Makoto
32e1e4788f Upgrade shrinkwraprs 2022-01-07 05:49:06 +09:00
Kitaiti Makoto
181a78876b Remove askama_escape from dependencies of plume-models 2022-01-07 05:47:46 +09:00
Kitaiti Makoto
61d5446113 Use plume_common::escape() instead of askama_escape::escape() directly 2022-01-07 05:47:08 +09:00
Kitaiti Makoto
dd54058516 Upgrade guid-create 2022-01-07 05:09:08 +09:00
Kitaiti Makoto
1e3851ea69 Execute SQLs for email_signups in transaction 2022-01-06 20:27:55 +09:00
Kitaiti Makoto
b6d38536e3 Add email signup feature 2022-01-06 20:18:20 +09:00
Kitaiti Makoto
9b4c678aa9 Make signup token transparent 2022-01-06 18:40:24 +09:00
Kitaiti Makoto
a65775d85b Implement EmailSignup 2022-01-05 03:17:58 +09:00
Kitaiti Makoto
192c7677c3 Run migration
% diesel migration run
2022-01-05 00:01:36 +09:00
Kitaiti Makoto
40efd73dfc Add config for sign up strategy 2022-01-05 00:01:32 +09:00
Kitaiti Makoto
6f8d5c1eb4 Add SmtpClient::new_with_addr() method 2022-01-03 18:09:13 +09:00
Kitaiti Makoto
62da4a3d5c Add native-tls to plume-models' dependencies 2022-01-03 18:04:49 +09:00
Kitaiti Makoto
a599760891 Use smtp module from plume_models instead of lettre directly 2022-01-03 17:36:11 +09:00
Kitaiti Makoto
00324f668f Add port field to MailConfig 2022-01-03 17:25:46 +09:00
Kitaiti Makoto
0836e3d693 Add Lettre to plume-models' dependencies 2022-01-03 17:09:47 +09:00
Kitaiti Makoto
0058c3053d Move mail config from plume::mail::mailer to plume_models::CONFIG 2022-01-03 15:50:04 +09:00
Kitaiti Makoto
5532b4a4d7 Ensure Post ap_url 2022-01-03 02:21:34 +09:00
Kitaiti Makoto
f0e7ea5640 (cargo-release) version {{version}} 2022-01-03 01:17:07 +09:00
Kitaiti Makoto
ef628aa498 (cargo-release) version {{version}} 2022-01-02 20:41:28 +09:00
Kitaiti Makoto
c67b702425 Cache LOCAL_INSTANCE_USER once 2021-12-05 20:57:10 +09:00
Kitaiti Makoto
e01539ef16 Follow Clippy 2021-12-05 20:24:11 +09:00
Kitaiti Makoto
5651e11ba1 Add FIXME comment 2021-12-05 20:22:10 +09:00
Kitaiti Makoto
d98132db80 Don't log unnecessary error 2021-12-05 19:32:27 +09:00
Kitaiti Makoto
25fe2ad802 Use request::get() instead of ClientBuilder 2021-12-05 19:32:27 +09:00
Kitaiti Makoto
12a8d00f8e Cache local instance user for test 2021-12-05 19:32:27 +09:00
Kitaiti Makoto
b9ea06a01a Don't stop even when caching local instance user 2021-12-05 19:32:27 +09:00
Kitaiti Makoto
1e67b3c13c Create local instance user on caching if it doesn't exist 2021-12-05 19:32:27 +09:00
Kitaiti Makoto
f4d7dfb261 Sign GET request to other instances 2021-12-05 19:32:27 +09:00
Kitaiti Makoto
af5b0b961b Extract Instance::create_local_instance_user() from get_local_instance_user_uncached() 2021-12-05 19:32:27 +09:00
Kitaiti Makoto
1506802c20 Implement LOCAL_INSTANCE_USER and related methods 2021-12-05 19:32:27 +09:00
Kitaiti Makoto
897ea8e11e Change const name: LOCAL_INSTANCE_USER -> LOCAL_INSTANCE_USERNAME 2021-12-05 19:32:27 +09:00
Kitaiti Makoto
858806149a Use concrete Error for Signer 2021-12-05 19:32:27 +09:00
Kitaiti Makoto
0da9572627 Implement User::get_local_instance_user() 2021-12-05 19:32:27 +09:00
Kitaiti Makoto
94cc260803 Add Instance to users::Role 2021-12-05 19:32:27 +09:00
Kitaiti Makoto
ae3344f318 Follow Rust and crates update 2021-11-28 08:06:29 +09:00
Kitaiti Makoto
89c185f819 Specify Rocket and serde_json version loosely 2021-11-28 08:06:29 +09:00
Kitaiti Makoto
811db1be0e Stick serde_json versoin for plume-models 2021-11-26 08:53:55 +09:00
Kitaiti Makoto
0fbefe2cdc Percent-encode Post slug on sending Activity to other instances 2021-09-07 13:31:06 +09:00
Kitaiti Makoto
83dbf2a945 Upgrade bcrypt 2021-08-14 19:20:21 +09:00
Tdxdxoz
a946823554 Specify rocket version 2021-07-06 22:36:59 +08:00
Kitaiti Makoto
dfcdcc1833 Remove heck from plume and plume-models 2021-04-10 16:39:23 +09:00
Kitaiti Makoto
6345a57498 Don't modify article title for slug 2021-04-10 16:37:26 +09:00
Kitaiti Makoto
87457c0ed1 Define Post::slug() 2021-04-10 16:30:50 +09:00
Kitaiti Makoto
7b2bab0f9d Extract Post::ap_url() 2021-04-09 10:55:09 +09:00
Kitaiti Makoto
4c2cd92f0d Prevent duplicated posts in 'all' timeline 2021-03-29 23:33:57 +09:00
Kitaiti Makoto
9e5ec0c9df Calculate media URI properly even when MEDIA_UPLOAD_DIRECTORY configured 2021-03-29 02:29:15 +09:00
Kitaiti Makoto
ebb0b45299 Create blog_authors only when needed 2021-03-28 04:26:17 +09:00
Kitaiti Makoto
702aa11ecf Don't drop path components of image URI 2021-03-28 04:26:17 +09:00
Kitaiti Makoto
33221d386e Upsert Post in from_activity() 2021-03-28 04:26:17 +09:00
Kitaiti Makoto
589c159eb9 Call Post::publish_updated() only for local posts 2021-03-28 04:26:17 +09:00
Kitaiti Makoto
ea1f4d48d5 Upsert Media in from_activity() 2021-03-28 04:26:17 +09:00
Kitaiti Makoto
462c5a1d42 Define Media::find_by_file_path() 2021-03-28 04:26:17 +09:00
Kitaiti Makoto
8e50d95a7a Fix code according to clippy 2021-03-28 03:46:37 +09:00
Kitaiti Makoto
77c08845b5 [BUG FIX]Make SearchActor subscribe to channel once 2021-03-27 23:55:26 +09:00
Kitaiti Makoto
2bfc26faf2 [BUG FIX]Make RemoveFetchActor subscribe to channel once 2021-03-27 23:54:09 +09:00
Kitaiti Makoto
451c3b5c88 Add TODO comments 2021-02-18 11:35:39 +09:00
Kitaiti Makoto
af5674074d Revert "Save remote post only when it doesn't exist on local"
This reverts commit 37cbf537bb.
2021-02-18 11:34:20 +09:00
Kitaiti Makoto
28380021a7 Determine file path of mirror of remote image using the URI 2021-02-18 01:23:57 +09:00
Kitaiti Makoto
37cbf537bb Save remote post only when it doesn't exist on local 2021-02-16 23:48:09 +09:00