"activitystreams-derive",
"chrono",
"mime",
- "serde 1.0.110",
+ "serde 1.0.111",
"serde_json 1.0.53",
"thiserror",
"url",
[[package]]
name = "activitystreams-ext"
version = "0.1.0"
-source = "git+https://git.asonix.dog/asonix/activitystreams-ext#862426e504832256a6b26e1ec2198c0bda22139b"
+source = "git+https://git.asonix.dog/asonix/activitystreams-ext#e5c97f4ea9f60e49bc7ff27fb0fb515d3190fd25"
dependencies = [
"activitystreams-new",
- "serde 1.0.110",
+ "serde 1.0.111",
"serde_json 1.0.53",
]
[[package]]
name = "activitystreams-new"
version = "0.1.0"
-source = "git+https://git.asonix.dog/asonix/activitystreams-sketch#2cd88752996d702b355f0cd2c8dc991af00b3cae"
+source = "git+https://git.asonix.dog/asonix/activitystreams-sketch#05a2bdc98d5595b0a74fd79b7e1b19f382ad3139"
dependencies = [
"activitystreams",
- "serde 1.0.110",
+ "serde 1.0.111",
"serde_json 1.0.53",
"typed-builder",
]
[[package]]
name = "actix-files"
-version = "0.2.1"
+version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "301482841d3d74483a446ead63cb7d362e187d2c8b603f13d91995621ea53c46"
+checksum = "193b22cb1f7b4ff12a4eb2415d6d19e47e44ea93e05930b30d05375ea29d3529"
dependencies = [
"actix-http",
"actix-service",
"bitflags",
"bytes",
"derive_more",
- "futures",
+ "futures-core",
+ "futures-util",
"log",
"mime",
"mime_guess",
"percent-encoding",
"pin-project",
"rand 0.7.3",
- "regex 1.3.7",
- "serde 1.0.110",
+ "regex 1.3.9",
+ "serde 1.0.111",
"serde_json 1.0.53",
"serde_urlencoded",
"sha1",
[[package]]
name = "actix-macros"
-version = "0.1.1"
+version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "21705adc76bbe4bc98434890e73a89cd00c6015e5704a60bb6eea6c3b72316b6"
+checksum = "a60f9ba7c4e6df97f3aacb14bb5c0cd7d98a49dcbaed0d7f292912ad9a6a3ed2"
dependencies = [
"quote",
"syn",
"bytestring",
"http",
"log",
- "regex 1.3.7",
- "serde 1.0.110",
+ "regex 1.3.9",
+ "serde 1.0.111",
]
[[package]]
[[package]]
name = "actix-server"
-version = "1.0.2"
+version = "1.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "582a7173c281a4f46b5aa168a11e7f37183dcb71177a39312cc2264da7a632c9"
+checksum = "e6d74b464215a473c973a2d7d03a69cc10f4ce1f4b38a7659c5193dc5c675630"
dependencies = [
"actix-codec",
"actix-rt",
"actix-service",
"actix-utils",
- "futures",
+ "futures-channel",
+ "futures-util",
"log",
"mio",
"mio-uds",
- "net2",
"num_cpus",
"slab",
+ "socket2",
]
[[package]]
[[package]]
name = "actix-testing"
-version = "1.0.0"
+version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "48494745b72d0ea8ff0cf874aaf9b622a3ee03d7081ee0c04edea4f26d32c911"
+checksum = "47239ca38799ab74ee6a8a94d1ce857014b2ac36f242f70f3f75a66f691e791c"
dependencies = [
"actix-macros",
"actix-rt",
"actix-server",
"actix-service",
- "futures",
"log",
- "net2",
+ "socket2",
]
[[package]]
name = "actix-threadpool"
-version = "0.3.1"
+version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cf4082192601de5f303013709ff84d81ca6a1bc4af7fb24f367a500a23c6e84e"
+checksum = "91164716d956745c79dcea5e66d2aa04506549958accefcede5368c70f2fd4ff"
dependencies = [
"derive_more",
"futures-channel",
"mime",
"net2",
"pin-project",
- "regex 1.3.7",
- "serde 1.0.110",
+ "regex 1.3.9",
+ "serde 1.0.111",
"serde_json 1.0.53",
"serde_urlencoded",
"time",
[[package]]
name = "actix-web-codegen"
-version = "0.2.1"
+version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4f00371942083469785f7e28c540164af1913ee7c96a4534acb9cea92c39f057"
+checksum = "a71bf475cbe07281d0b3696abb48212db118e7e23219f13596ce865235ff5766"
dependencies = [
"proc-macro2",
"quote",
[[package]]
name = "addr2line"
-version = "0.12.0"
+version = "0.12.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "456d75cbb82da1ad150c8a9d97285ffcd21c9931dcb11e995903e7d75141b38b"
+checksum = "a49806b9dadc843c61e7c97e72490ad7f7220ae249012fbda9ad0609457c0543"
dependencies = [
"gimli",
]
[[package]]
name = "async-trait"
-version = "0.1.31"
+version = "0.1.32"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "26c4f3195085c36ea8d24d32b2f828d23296a9370a28aa39d111f6f16bef9f3b"
+checksum = "0eb7f9ad01405feb3c1dac82463038945cf88eea4569acaf3ad662233496dd96"
dependencies = [
"proc-macro2",
"quote",
"mime",
"percent-encoding",
"rand 0.7.3",
- "serde 1.0.110",
+ "serde 1.0.111",
"serde_json 1.0.53",
"serde_urlencoded",
]
[[package]]
name = "bumpalo"
-version = "3.3.0"
+version = "3.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5356f1d23ee24a1f785a56d1d1a5f0fd5b0f6a0c0fb2412ce11da71649ab78f6"
+checksum = "2e8c087f005730276d1096a652e92a8bacee2e2472bcc9715a74d2bec38b5820"
[[package]]
name = "byte-tools"
[[package]]
name = "cc"
-version = "1.0.53"
+version = "1.0.54"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "404b1fe4f65288577753b17e3b36a04596ee784493ec249bf81c7f2d2acd751c"
+checksum = "7bbb73db36c1246e9034e307d0fba23f9a2e251faa47ade70c1bd252220c8311"
[[package]]
name = "cfg-if"
dependencies = [
"num-integer",
"num-traits 0.2.11",
- "serde 1.0.110",
+ "serde 1.0.111",
"time",
]
"lazy_static 1.4.0",
"pest",
"pest_derive",
- "regex 1.3.7",
+ "regex 1.3.9",
"twoway",
"typed-arena",
"unicode_categories",
"lazy_static 1.4.0",
"nom 5.1.1",
"rust-ini",
- "serde 1.0.110",
+ "serde 1.0.111",
"serde-hjson 0.9.1",
"serde_json 1.0.53",
"toml",
[[package]]
name = "copyless"
-version = "0.1.4"
+version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6ff9c56c9fb2a49c05ef0e431485a22400af20d33226dc0764d891d09e724127"
+checksum = "a2df960f5d869b2dd8532793fde43eb5427cceb126c929747a26823ab0eeb536"
[[package]]
name = "core-foundation"
"atty",
"humantime",
"log",
- "regex 1.3.7",
+ "regex 1.3.9",
"termcolor",
]
[[package]]
name = "indexmap"
-version = "1.3.2"
+version = "1.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "076f042c5b7b98f31d205f1249267e12a6518c1481e9dae9764af19b707d2292"
+checksum = "c398b2b113b55809ceb9ee3e753fcbac793f1956663f3c36549c1346015c2afe"
dependencies = [
"autocfg 1.0.0",
]
[[package]]
name = "isahc"
-version = "0.9.2"
+version = "0.9.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ee16417863ac2b4869ac774af7ef0322b08c53d952665edc5749ccaa37d68588"
+checksum = "098c47b6176a9b667292810105999d6029d8338819f299584677e8a125e549c2"
dependencies = [
"bytes",
"crossbeam-channel",
"mime",
"slab",
"sluice",
+ "tracing",
+ "tracing-futures",
]
[[package]]
[[package]]
name = "js-sys"
-version = "0.3.39"
+version = "0.3.40"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fa5a448de267e7358beaf4a5d849518fe9a0c13fce7afd44b06e68550e5562a7"
+checksum = "ce10c23ad2ea25ceca0093bd3192229da4c5b3c0f2de499c1ecac0d98d452177"
dependencies = [
"wasm-bindgen",
]
"base64 0.11.0",
"pem",
"ring",
- "serde 1.0.110",
+ "serde 1.0.111",
"serde_json 1.0.53",
"simple_asn1",
]
"openssl",
"percent-encoding",
"rand 0.7.3",
- "regex 1.3.7",
+ "regex 1.3.9",
"rss",
- "serde 1.0.110",
+ "serde 1.0.111",
"serde_json 1.0.53",
"sha2",
"strum",
"log",
"native-tls",
"nom 4.2.3",
- "serde 1.0.110",
+ "serde 1.0.111",
"serde_derive",
"serde_json 1.0.53",
]
[[package]]
name = "libc"
-version = "0.2.70"
+version = "0.2.71"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3baa92041a6fec78c687fa0cc2b3fae8884f743d672cf551bed1d6dac6988d0f"
+checksum = "9457b06509d27052635f90d6466700c65095fdf75409b3fbdd903e988b886f49"
[[package]]
name = "libnghttp2-sys"
-version = "0.1.3"
+version = "0.1.4+1.41.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b359f5ec8106bc297694c9a562ace312be2cfd17a5fc68dc12249845aa144b11"
+checksum = "03624ec6df166e79e139a2310ca213283d6b3c30810c54844f307086d4488df1"
dependencies = [
"cc",
"libc",
dependencies = [
"lexical-core",
"memchr 2.3.3",
- "version_check 0.9.1",
+ "version_check 0.9.2",
]
[[package]]
[[package]]
name = "openssl-sys"
-version = "0.9.56"
+version = "0.9.57"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f02309a7f127000ed50594f0b50ecc69e7c654e16d41b4e8156d1b3df8e0b52e"
+checksum = "7410fef80af8ac071d4f63755c0ab89ac3df0fd1ea91f1d1f37cf5cec4395990"
dependencies = [
"autocfg 1.0.0",
"cc",
dependencies = [
"base64 0.11.0",
"lazy_static 1.4.0",
- "regex 1.3.7",
+ "regex 1.3.9",
]
[[package]]
[[package]]
name = "pin-project-lite"
-version = "0.1.5"
+version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f7505eeebd78492e0f6108f7171c4948dbb120ee8119d9d77d0afa5469bef67f"
+checksum = "9df32da11d84f3a7d70205549562966279adb900e080fad3dccd8e64afccf0ad"
[[package]]
name = "pin-utils"
[[package]]
name = "proc-macro-hack"
-version = "0.5.15"
+version = "0.5.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0d659fe7c6d27f25e9d80a1a094c223f5246f6a6596453e09d7229bf42750b63"
+checksum = "7e0456befd48169b9f13ef0f0ad46d492cf9d2dbb918bcf38e01eed4ce3ec5e4"
[[package]]
name = "proc-macro-nested"
[[package]]
name = "proc-macro2"
-version = "1.0.13"
+version = "1.0.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "53f5ffe53a6b28e37c9c1ce74893477864d64f74778a93a4beb43c8fa167f639"
+checksum = "beae6331a816b1f65d04c45b078fd8e6c93e8071771f41b8163255bbd8d7c8fa"
dependencies = [
"unicode-xid",
]
[[package]]
name = "regex"
-version = "1.3.7"
+version = "1.3.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a6020f034922e3194c711b82a627453881bc4682166cabb07134a10c26ba7692"
+checksum = "9c3780fcf44b193bc4d09f36d2a3c87b251da4a046c87795a0d35f4f927ad8e6"
dependencies = [
"aho-corasick 0.7.10",
"memchr 2.3.3",
- "regex-syntax 0.6.17",
+ "regex-syntax 0.6.18",
"thread_local 1.0.1",
]
[[package]]
name = "regex-syntax"
-version = "0.6.17"
+version = "0.6.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7fe5bd57d1d7414c6b5ed48563a2c855d995ff777729dcd91c369ec7fea395ae"
+checksum = "26412eb97c6b088a6997e05f69403a802a92d520de2f8e63c2b65f9e0f47c4e8"
[[package]]
name = "remove_dir_all"
[[package]]
name = "ring"
-version = "0.16.13"
+version = "0.16.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "703516ae74571f24b465b4a1431e81e2ad51336cb0ded733a55a1aa3eccac196"
+checksum = "06b3fefa4f12272808f809a0af618501fdaba41a58963c5fb72238ab0be09603"
dependencies = [
"cc",
"libc",
[[package]]
name = "ryu"
-version = "1.0.4"
+version = "1.0.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ed3d612bc64430efeb3f7ee6ef26d590dce0c43249217bddc62112540c7941e1"
+checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e"
[[package]]
name = "safemem"
[[package]]
name = "serde"
-version = "1.0.110"
+version = "1.0.111"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "99e7b308464d16b56eba9964e4972a3eee817760ab60d88c3f86e1fecb08204c"
+checksum = "c9124df5b40cbd380080b2cc6ab894c040a3070d995f5c9dc77e18c34a8ae37d"
dependencies = [
"serde_derive",
]
"lazy_static 0.2.11",
"linked-hash-map 0.3.0",
"num-traits 0.1.43",
- "regex 1.3.7",
+ "regex 1.3.9",
"serde 0.8.23",
]
"lazy_static 1.4.0",
"linked-hash-map 0.3.0",
"num-traits 0.1.43",
- "regex 1.3.7",
+ "regex 1.3.9",
"serde 0.8.23",
]
[[package]]
name = "serde_derive"
-version = "1.0.110"
+version = "1.0.111"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "818fbf6bfa9a42d3bfcaca148547aa00c7b915bec71d1757aa2d44ca68771984"
+checksum = "3f2c3ac8e6ca1e9c80b8be1023940162bf81ae3cffbb1809474152f2ce1eb250"
dependencies = [
"proc-macro2",
"quote",
"indexmap",
"itoa 0.4.5",
"ryu",
- "serde 1.0.110",
+ "serde 1.0.111",
]
[[package]]
dependencies = [
"dtoa 0.4.5",
"itoa 0.4.5",
- "serde 1.0.110",
+ "serde 1.0.111",
"url",
]
[[package]]
name = "sha2"
-version = "0.8.1"
+version = "0.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "27044adfd2e1f077f649f59deb9490d3941d674002f7d062870a60ebe9bd47a0"
+checksum = "a256f46ea78a0c0d9ff00077504903ac881a1dafdc20da66545699e7776b3e69"
dependencies = [
"block-buffer",
"digest",
[[package]]
name = "syn"
-version = "1.0.22"
+version = "1.0.30"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1425de3c33b0941002740a420b1a906a350b88d08b82b2c8a01035a3f9447bac"
+checksum = "93a56fabc59dce20fe48b6c832cc249c713e7ed88fa28b0ee0a3bfcaae5fe4e2"
dependencies = [
"proc-macro2",
"quote",
[[package]]
name = "thiserror"
-version = "1.0.18"
+version = "1.0.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5976891d6950b4f68477850b5b9e5aa64d955961466f9e174363f573e54e8ca7"
+checksum = "b13f926965ad00595dd129fa12823b04bbf866e9085ab0a5f2b05b850fbfc344"
dependencies = [
"thiserror-impl",
]
[[package]]
name = "thiserror-impl"
-version = "1.0.18"
+version = "1.0.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ab81dbd1cd69cd2ce22ecfbdd3bdb73334ba25350649408cc6c085f46d89573d"
+checksum = "893582086c2f98cde18f906265a65b5030a074b1046c674ae898be6519a7f479"
dependencies = [
"proc-macro2",
"quote",
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ffc92d160b1eef40665be3a05630d003936a3bc7da7421277846c2613e92c71a"
dependencies = [
- "serde 1.0.110",
+ "serde 1.0.111",
+]
+
+[[package]]
+name = "tracing"
+version = "0.1.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a41f40ed0e162c911ac6fcb53ecdc8134c46905fdbbae8c50add462a538b495f"
+dependencies = [
+ "cfg-if",
+ "log",
+ "tracing-attributes",
+ "tracing-core",
+]
+
+[[package]]
+name = "tracing-attributes"
+version = "0.1.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "99bbad0de3fd923c9c3232ead88510b783e5a4d16a6154adffa3d53308de984c"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "tracing-core"
+version = "0.1.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0aa83a9a47081cd522c09c81b31aec2c9273424976f922ad61c053b58350b715"
+dependencies = [
+ "lazy_static 1.4.0",
+]
+
+[[package]]
+name = "tracing-futures"
+version = "0.2.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ab7bb6f14721aa00656086e9335d363c5c8747bae02ebe32ea2c7dece5689b4c"
+dependencies = [
+ "pin-project",
+ "tracing",
]
[[package]]
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6"
dependencies = [
- "version_check 0.9.1",
+ "version_check 0.9.2",
]
[[package]]
"idna",
"matches",
"percent-encoding",
- "serde 1.0.110",
+ "serde 1.0.111",
]
[[package]]
checksum = "9fde2f6a4bea1d6e007c4ad38c6839fa71cbb63b6dbf5b595aa38dc9b1093c11"
dependencies = [
"rand 0.7.3",
- "serde 1.0.110",
+ "serde 1.0.111",
]
[[package]]
[[package]]
name = "vcpkg"
-version = "0.2.8"
+version = "0.2.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3fc439f2794e98976c88a2a2dafce96b930fe8010b0a256b3c2199a773933168"
+checksum = "55d1e41d56121e07f1e223db0a4def204e45c85425f6a16d462fd07c8d10d74c"
[[package]]
name = "vec_map"
[[package]]
name = "version_check"
-version = "0.9.1"
+version = "0.9.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "078775d0255232fb988e6fccf26ddc9d1ac274299aaedcedce21c6f72cc533ce"
+checksum = "b5a972e5669d67ba988ce3dc826706fb0a8b01471c088cb0b6110b805cc36aed"
[[package]]
name = "wasi"
[[package]]
name = "wasm-bindgen"
-version = "0.2.62"
+version = "0.2.63"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e3c7d40d09cdbf0f4895ae58cf57d92e1e57a9dd8ed2e8390514b54a47cc5551"
+checksum = "4c2dc4aa152834bc334f506c1a06b866416a8b6697d5c9f75b9a689c8486def0"
dependencies = [
"cfg-if",
"wasm-bindgen-macro",
[[package]]
name = "wasm-bindgen-backend"
-version = "0.2.62"
+version = "0.2.63"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c3972e137ebf830900db522d6c8fd74d1900dcfc733462e9a12e942b00b4ac94"
+checksum = "ded84f06e0ed21499f6184df0e0cb3494727b0c5da89534e0fcc55c51d812101"
dependencies = [
"bumpalo",
"lazy_static 1.4.0",
[[package]]
name = "wasm-bindgen-macro"
-version = "0.2.62"
+version = "0.2.63"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2cd85aa2c579e8892442954685f0d801f9129de24fa2136b2c6a539c76b65776"
+checksum = "838e423688dac18d73e31edce74ddfac468e37b1506ad163ffaf0a46f703ffe3"
dependencies = [
"quote",
"wasm-bindgen-macro-support",
[[package]]
name = "wasm-bindgen-macro-support"
-version = "0.2.62"
+version = "0.2.63"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8eb197bd3a47553334907ffd2f16507b4f4f01bbec3ac921a7719e0decdfe72a"
+checksum = "3156052d8ec77142051a533cdd686cba889537b213f948cd1d20869926e68e92"
dependencies = [
"proc-macro2",
"quote",
[[package]]
name = "wasm-bindgen-shared"
-version = "0.2.62"
+version = "0.2.63"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a91c2916119c17a8e316507afaaa2dd94b47646048014bbdf6bef098c1bb58ad"
+checksum = "c9ba19973a58daf4db6f352eda73dc0e289493cd29fb2632eb172085b6521acd"
[[package]]
name = "web-sys"
-version = "0.3.39"
+version = "0.3.40"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8bc359e5dd3b46cb9687a051d50a2fdd228e4ba7cf6fcf861a5365c3d671a642"
+checksum = "7b72fe77fd39e4bd3eaa4412fd299a0be6b3dfe9d2597e2f1c20beb968f41d17"
dependencies = [
"js-sys",
"wasm-bindgen",
[[package]]
name = "yaml-rust"
-version = "0.4.3"
+version = "0.4.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "65923dd1784f44da1d2c3dbbc5e822045628c590ba72123e1c73d3c230c4434d"
+checksum = "39f0c922f1a334134dc2f7a8b67dc5d25f0735263feec974345ff706bcf20b0d"
dependencies = [
"linked-hash-map 0.5.3",
]
routes::DbPoolParam,
};
use activitystreams::{
- activity::{Follow, Undo},
actor::{properties::ApActorProperties, Person},
context,
endpoint::EndpointProperties,
object::{properties::ObjectProperties, AnyImage, Image},
+ primitives::XsdAnyUri,
};
use activitystreams_ext::Ext2;
-use activitystreams_new::object::Tombstone;
+use activitystreams_new::{
+ activity::{Follow, Undo},
+ object::Tombstone,
+ prelude::*,
+};
use actix_web::{body::Body, web::Path, HttpResponse, Result};
use diesel::PgConnection;
use failure::Error;
/// As a given local user, send out a follow request to a remote community.
fn send_follow(&self, follow_actor_id: &str, conn: &PgConnection) -> Result<(), Error> {
- let mut follow = Follow::new();
-
let id = format!("{}/follow/{}", self.actor_id, uuid::Uuid::new_v4());
-
- follow
- .object_props
- .set_context_xsd_any_uri(context())?
- .set_id(id)?;
- follow
- .follow_props
- .set_actor_xsd_any_uri(self.actor_id.to_owned())?
- .set_object_xsd_any_uri(follow_actor_id)?;
+ let mut follow = Follow::new(self.actor_id.to_owned(), follow_actor_id);
+ follow.set_context(context()).set_id(id.parse()?);
let to = format!("{}/inbox", follow_actor_id);
insert_activity(&conn, self.id, &follow, true)?;
}
fn send_unfollow(&self, follow_actor_id: &str, conn: &PgConnection) -> Result<(), Error> {
- let mut follow = Follow::new();
-
let id = format!("{}/follow/{}", self.actor_id, uuid::Uuid::new_v4());
+ let mut follow = Follow::new(self.actor_id.to_owned(), follow_actor_id);
+ follow.set_context(context()).set_id(id.parse()?);
- follow
- .object_props
- .set_context_xsd_any_uri(context())?
- .set_id(id)?;
- follow
- .follow_props
- .set_actor_xsd_any_uri(self.actor_id.to_owned())?
- .set_object_xsd_any_uri(follow_actor_id)?;
let to = format!("{}/inbox", follow_actor_id);
// TODO
// Undo that fake activity
let undo_id = format!("{}/undo/follow/{}", self.actor_id, uuid::Uuid::new_v4());
- let mut undo = Undo::default();
-
- undo
- .object_props
- .set_context_xsd_any_uri(context())?
- .set_id(undo_id)?;
-
- undo
- .undo_props
- .set_actor_xsd_any_uri(self.actor_id.to_owned())?
- .set_object_base_box(follow)?;
+ let mut undo = Undo::new(self.actor_id.parse::<XsdAnyUri>()?, follow.into_any_base()?);
+ undo.set_context(context()).set_id(undo_id.parse()?);
insert_activity(&conn, self.id, &undo, true)?;