diff --git a/Cargo.lock b/Cargo.lock index 78ab0e924..29bdde002 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -16,9 +16,9 @@ checksum = "8f27d075294830fcab6f66e320dab524bc6d048f4a151698e153205559113772" [[package]] name = "activitypub_federation" -version = "0.5.5" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e54fe65c4a4b57712d8e436f1fb86ff37e10b56f011f4233fbbfa8c669163e9d" +checksum = "ac8ff2d0151ce9ac02eb29e4a58b41d28693f141f7963d4bfabd2f9d402ecec7" dependencies = [ "activitystreams-kinds", "actix-web", @@ -68,7 +68,7 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f7b0a21988c1bf877cf4759ef5ddaac04c1c9fe808c9142ecb78ba97d97a28a" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.4.2", "bytes", "futures-core", "futures-sink", @@ -123,7 +123,7 @@ dependencies = [ "actix-utils", "ahash", "base64 0.21.7", - "bitflags 2.5.0", + "bitflags 2.4.2", "brotli", "bytes", "bytestring", @@ -157,7 +157,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e01ed3140b2f8d422c68afa1ed2e85d996ea619c988ac834d255db32138655cb" dependencies = [ "quote", - "syn 2.0.60", + "syn 2.0.53", ] [[package]] @@ -315,7 +315,7 @@ dependencies = [ "actix-router", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.53", ] [[package]] @@ -376,9 +376,9 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "1.1.3" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" dependencies = [ "memchr", ] @@ -400,9 +400,9 @@ dependencies = [ [[package]] name = "allocator-api2" -version = "0.2.18" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" +checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" [[package]] name = "android-tzdata" @@ -421,48 +421,47 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.14" +version = "0.6.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b" +checksum = "d96bd03f33fe50a863e394ee9718a706f988b9079b20c3784fb726e7678b62fb" dependencies = [ "anstyle", "anstyle-parse", "anstyle-query", "anstyle-wincon", "colorchoice", - "is_terminal_polyfill", "utf8parse", ] [[package]] name = "anstyle" -version = "1.0.7" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" +checksum = "8901269c6307e8d93993578286ac0edf7f195079ffff5ebdeea6a59ffb7e36bc" [[package]] name = "anstyle-parse" -version = "0.2.4" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4" +checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.0.3" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a64c907d4e79225ac72e2a354c9ce84d50ebb4586dee56c82b3ee73004f537f5" +checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648" dependencies = [ "windows-sys 0.52.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.3" +version = "3.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61a38449feb7068f52bb06c12759005cf459ee52bb4adc1d5a7c4322d716fb19" +checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" dependencies = [ "anstyle", "windows-sys 0.52.0", @@ -495,9 +494,9 @@ dependencies = [ [[package]] name = "async-compression" -version = "0.4.9" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e9eabd7a98fe442131a17c316bd9349c43695e49e730c3c8e12cfb5f4da2693" +checksum = "a116f46a969224200a0a97f29cfd4c50e7534e4b4826bd23ea2c3c533039c82c" dependencies = [ "flate2", "futures-core", @@ -536,7 +535,7 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.53", ] [[package]] @@ -547,7 +546,7 @@ checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.53", ] [[package]] @@ -571,15 +570,15 @@ checksum = "c59bdb34bc650a32731b31bd8f0829cc15d24a708ee31559e0bb34f2bc320cba" [[package]] name = "autocfg" -version = "1.2.0" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1fdabc7756949593fe60f30ec81974b613357de856987752631dea1e3394c80" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "aws-lc-rs" -version = "1.7.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5509d663b2c00ee421bda8d6a24d6c42e15970957de1701b8df9f6fbe5707df1" +checksum = "8487b59d62764df8231cb371c459314df895b41756df457a1fb1243d65c89195" dependencies = [ "aws-lc-sys", "mirai-annotations", @@ -589,9 +588,9 @@ dependencies = [ [[package]] name = "aws-lc-sys" -version = "0.15.0" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d5d317212c2a78d86ba6622e969413c38847b62f48111f8b763af3dac2f9840" +checksum = "c15eb61145320320eb919d9bab524617a7aa4216c78d342fae3a758bc33073e4" dependencies = [ "bindgen", "cc", @@ -649,9 +648,9 @@ dependencies = [ [[package]] name = "backtrace" -version = "0.3.71" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" +checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" dependencies = [ "addr2line", "cc", @@ -707,7 +706,7 @@ dependencies = [ "async-trait", "futures-channel", "futures-util", - "parking_lot 0.12.2", + "parking_lot 0.12.1", "tokio", ] @@ -749,7 +748,7 @@ version = "0.69.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a00dc851838a2120612785d195287475a3ac45514741da670b735818822129a0" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.4.2", "cexpr", "clang-sys", "itertools 0.12.1", @@ -762,7 +761,7 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn 2.0.60", + "syn 2.0.53", "which", ] @@ -789,9 +788,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.5.0" +version = "2.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" +checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" dependencies = [ "serde", ] @@ -844,9 +843,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.16.0" +version = "3.15.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" +checksum = "7ff69b9dd49fd426c69a0db9fc04dd934cdb6645ff000864d98f7e2af8830eaa" [[package]] name = "bytemuck" @@ -891,13 +890,12 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.96" +version = "1.0.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "065a29261d53ba54260972629f9ca6bffa69bac13cd1fed61420f7fa68b9f8bd" +checksum = "8cd6604a82acf3039f1144f54b8eb34e91ffba622051189e71b781822d5ee1f5" dependencies = [ "jobserver", "libc", - "once_cell", ] [[package]] @@ -933,7 +931,7 @@ dependencies = [ "num-traits", "serde", "wasm-bindgen", - "windows-targets 0.52.5", + "windows-targets 0.52.4", ] [[package]] @@ -942,7 +940,7 @@ version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8eebd66744a15ded14960ab4ccdbfb51ad3b81f51f3f04a80adac98c985396c9" dependencies = [ - "hashbrown 0.14.5", + "hashbrown 0.14.3", "stacker", ] @@ -986,7 +984,7 @@ dependencies = [ "anstream", "anstyle", "clap_lex", - "strsim 0.11.1", + "strsim 0.11.0", ] [[package]] @@ -998,7 +996,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.53", ] [[package]] @@ -1060,15 +1058,15 @@ checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" [[package]] name = "colorchoice" -version = "1.0.1" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422" +checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" [[package]] name = "combine" -version = "4.6.7" +version = "4.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd" +checksum = "35ed6e9d84f0b51a7f52daf1c7d71dd136fd7a3f41a8462b8cdb8c78d920fad4" dependencies = [ "bytes", "memchr", @@ -1118,8 +1116,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fd326812b3fd01da5bb1af7d340d0d555fd3d4b641e7f1dfcf5962a902952787" dependencies = [ "futures-core", - "prost 0.12.4", - "prost-types 0.12.4", + "prost 0.12.3", + "prost-types 0.12.3", "tonic 0.10.2", "tracing-core", ] @@ -1160,7 +1158,7 @@ dependencies = [ "futures-task", "hdrhistogram", "humantime", - "prost-types 0.12.4", + "prost-types 0.12.3", "serde", "serde_json", "thread_local", @@ -1358,7 +1356,7 @@ dependencies = [ "proc-macro2", "quote", "strsim 0.10.0", - "syn 2.0.60", + "syn 2.0.53", ] [[package]] @@ -1391,7 +1389,7 @@ checksum = "a668eda54683121533a393014d8692171709ff57a7d61f187b6e782719f8933f" dependencies = [ "darling_core 0.20.8", "quote", - "syn 2.0.60", + "syn 2.0.53", ] [[package]] @@ -1401,10 +1399,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" dependencies = [ "cfg-if", - "hashbrown 0.14.5", + "hashbrown 0.14.3", "lock_api", "once_cell", - "parking_lot_core 0.9.10", + "parking_lot_core 0.9.9", ] [[package]] @@ -1443,9 +1441,9 @@ dependencies = [ [[package]] name = "der" -version = "0.7.9" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0" +checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" dependencies = [ "const-oid", "zeroize", @@ -1511,7 +1509,7 @@ dependencies = [ "darling 0.20.8", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.53", ] [[package]] @@ -1531,7 +1529,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "206868b8242f27cecce124c19fd88157fbd0dd334df2587f36417bafbc85097b" dependencies = [ "derive_builder_core 0.20.0", - "syn 2.0.60", + "syn 2.0.53", ] [[package]] @@ -1562,7 +1560,7 @@ version = "2.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff236accb9a5069572099f0b350a92e9560e8e63a9b8d546162f4a5e03026bb2" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.4.2", "byteorder", "chrono", "diesel_derives", @@ -1598,7 +1596,7 @@ dependencies = [ "heck 0.4.1", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.53", ] [[package]] @@ -1609,19 +1607,19 @@ checksum = "d5adf688c584fe33726ce0e2898f608a2a92578ac94a4a92fcecf73214fe0716" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.53", ] [[package]] name = "diesel_derives" -version = "2.1.4" +version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14701062d6bed917b5c7103bdffaee1e4609279e240488ad24e7bd979ca6866c" +checksum = "5d02eecb814ae714ffe61ddc2db2dd03e6c49a42e269b5001355500d431cce0c" dependencies = [ "diesel_table_macro_syntax", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.53", ] [[package]] @@ -1651,7 +1649,7 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc5557efc453706fed5e4fa85006fe9817c224c3f480a34c7e5959fd700921c5" dependencies = [ - "syn 2.0.60", + "syn 2.0.53", ] [[package]] @@ -1706,9 +1704,9 @@ dependencies = [ [[package]] name = "downcast-rs" -version = "1.2.1" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" +checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" [[package]] name = "dunce" @@ -1724,9 +1722,9 @@ checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125" [[package]] name = "either" -version = "1.11.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a47c1c47d2f5964e29c61246e81db715514cd532db6b5116a25ea3c03d6780a2" +checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a" [[package]] name = "elementtree" @@ -1785,7 +1783,7 @@ checksum = "f282cfdfe92516eb26c2af8589c274c7c17681f5ecc03c18255fe741c6aa64eb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.53", ] [[package]] @@ -1897,9 +1895,9 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.1.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" +checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" [[package]] name = "fdeflate" @@ -1918,9 +1916,9 @@ checksum = "8fcfdc7a0362c9f4444381a9e697c79d435fe65b52a37466fc2c1184cee9edc6" [[package]] name = "flate2" -version = "1.0.30" +version = "1.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f54427cfd1c7829e2a139fcefea601bf088ebca651d2bf53ebc600eac295dae" +checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" dependencies = [ "crc32fast", "miniz_oxide", @@ -2038,7 +2036,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.53", ] [[package]] @@ -2117,9 +2115,9 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "h2" -version = "0.3.26" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" +checksum = "4fbd2820c5e49886948654ab546d0688ff24530286bdcf8fca3cefb16d4618eb" dependencies = [ "bytes", "fnv", @@ -2127,7 +2125,7 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap 2.2.6", + "indexmap 2.2.5", "slab", "tokio", "tokio-util", @@ -2151,9 +2149,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.14.5" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" dependencies = [ "ahash", "allocator-api2", @@ -2427,7 +2425,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8215279f83f9b829403812f845aa2d0dd5966332aa2fd0334a375256f3dd0322" dependencies = [ "quote", - "syn 2.0.60", + "syn 2.0.53", ] [[package]] @@ -2517,12 +2515,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.6" +version = "2.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +checksum = "7b0b929d511467233429c45a44ac1dcaa21ba0f5ba11e4879e6ed28ddb4f9df4" dependencies = [ "equivalent", - "hashbrown 0.14.5", + "hashbrown 0.14.3", "serde", ] @@ -2561,12 +2559,6 @@ version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" -[[package]] -name = "is_terminal_polyfill" -version = "1.70.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800" - [[package]] name = "itertools" version = "0.10.5" @@ -2576,6 +2568,15 @@ dependencies = [ "either", ] +[[package]] +name = "itertools" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" +dependencies = [ + "either", +] + [[package]] name = "itertools" version = "0.12.1" @@ -2587,9 +2588,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.11" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" +checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" [[package]] name = "jni" @@ -2613,9 +2614,9 @@ checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" [[package]] name = "jobserver" -version = "0.1.31" +version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2b099aaa34a9751c5bf0878add70444e1ed2dd73f347be99003d4577277de6e" +checksum = "ab46a6e9526ddef3ae7f787c06f0f2600639ba80ea3eade3d8e670a2230f51d6" dependencies = [ "libc", ] @@ -2663,7 +2664,7 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "lemmy_api" -version = "0.19.4-beta.6" +version = "0.19.4-beta.7" dependencies = [ "activitypub_federation", "actix-web", @@ -2692,7 +2693,7 @@ dependencies = [ [[package]] name = "lemmy_api_common" -version = "0.19.4-beta.6" +version = "0.19.4-beta.7" dependencies = [ "activitypub_federation", "actix-web", @@ -2730,7 +2731,7 @@ dependencies = [ [[package]] name = "lemmy_api_crud" -version = "0.19.4-beta.6" +version = "0.19.4-beta.7" dependencies = [ "accept-language", "activitypub_federation", @@ -2753,7 +2754,7 @@ dependencies = [ [[package]] name = "lemmy_apub" -version = "0.19.4-beta.6" +version = "0.19.4-beta.7" dependencies = [ "activitypub_federation", "actix-web", @@ -2791,7 +2792,7 @@ dependencies = [ [[package]] name = "lemmy_db_perf" -version = "0.19.4-beta.6" +version = "0.19.4-beta.7" dependencies = [ "anyhow", "clap", @@ -2806,7 +2807,7 @@ dependencies = [ [[package]] name = "lemmy_db_schema" -version = "0.19.4-beta.6" +version = "0.19.4-beta.7" dependencies = [ "activitypub_federation", "anyhow", @@ -2846,7 +2847,7 @@ dependencies = [ [[package]] name = "lemmy_db_views" -version = "0.19.4-beta.6" +version = "0.19.4-beta.7" dependencies = [ "actix-web", "chrono", @@ -2868,7 +2869,7 @@ dependencies = [ [[package]] name = "lemmy_db_views_actor" -version = "0.19.4-beta.6" +version = "0.19.4-beta.7" dependencies = [ "chrono", "diesel", @@ -2888,7 +2889,7 @@ dependencies = [ [[package]] name = "lemmy_db_views_moderator" -version = "0.19.4-beta.6" +version = "0.19.4-beta.7" dependencies = [ "diesel", "diesel-async", @@ -2900,7 +2901,7 @@ dependencies = [ [[package]] name = "lemmy_federate" -version = "0.19.4-beta.6" +version = "0.19.4-beta.7" dependencies = [ "activitypub_federation", "anyhow", @@ -2923,7 +2924,7 @@ dependencies = [ [[package]] name = "lemmy_routes" -version = "0.19.4-beta.6" +version = "0.19.4-beta.7" dependencies = [ "activitypub_federation", "actix-web", @@ -2948,7 +2949,7 @@ dependencies = [ [[package]] name = "lemmy_server" -version = "0.19.4-beta.6" +version = "0.19.4-beta.7" dependencies = [ "activitypub_federation", "actix-cors", @@ -2991,7 +2992,7 @@ dependencies = [ [[package]] name = "lemmy_utils" -version = "0.19.4-beta.6" +version = "0.19.4-beta.7" dependencies = [ "actix-web", "anyhow", @@ -3058,9 +3059,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.154" +version = "0.2.153" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae743338b92ff9146ce83992f766a31066a91a8c84a45e0e9f21e7cf6de6d346" +checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" [[package]] name = "libloading" @@ -3069,14 +3070,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c2a198fb6b0eada2a8df47933734e6d35d350665a33a3593d7164fa52c75c19" dependencies = [ "cfg-if", - "windows-targets 0.52.5", + "windows-targets 0.52.4", ] [[package]] name = "line-wrap" -version = "0.2.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd1bc4d24ad230d21fb898d1116b1801d7adfc449d42026475862ab48b11e70e" +checksum = "f30344350a2a51da54c1d53be93fade8a237e545dbcc4bdbe635413f2117cab9" +dependencies = [ + "safemem", +] [[package]] name = "linked-hash-map" @@ -3124,9 +3128,9 @@ checksum = "4d873d7c67ce09b42110d801813efbc9364414e356be9935700d368351657487" [[package]] name = "lock_api" -version = "0.4.12" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" +checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" dependencies = [ "autocfg", "scopeguard", @@ -3244,9 +3248,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.7.2" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" +checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" [[package]] name = "metrics" @@ -3266,7 +3270,7 @@ checksum = "9bf4e7146e30ad172c42c39b3246864bd2d3c6396780711a1baf749cfe423e21" dependencies = [ "base64 0.21.7", "hyper", - "indexmap 2.2.6", + "indexmap 2.2.5", "ipnet", "metrics", "metrics-util", @@ -3283,7 +3287,7 @@ checksum = "8b07a5eb561b8cbc16be2d216faf7757f9baf3bfb94dbb0fae3df8387a5bb47f" dependencies = [ "crossbeam-epoch", "crossbeam-utils", - "hashbrown 0.14.5", + "hashbrown 0.14.3", "metrics", "num_cpus", "quanta", @@ -3375,7 +3379,7 @@ dependencies = [ "event-listener 5.3.0", "futures-util", "once_cell", - "parking_lot 0.12.2", + "parking_lot 0.12.1", "quanta", "rustc_version", "smallvec", @@ -3513,7 +3517,7 @@ version = "0.10.64" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95a0481286a310808298130d22dd1fef0fa571e05a8f44ec801801e84b216b1f" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.4.2", "cfg-if", "foreign-types", "libc", @@ -3530,7 +3534,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.53", ] [[package]] @@ -3541,9 +3545,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.102" +version = "0.9.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c597637d56fbc83893a35eb0dd04b2b8e7a50c91e64e9493e398b5df4fb45fa2" +checksum = "dda2b0f344e78efc2facf7d195d098df0dd72151b26ab98da807afc26c198dff" dependencies = [ "cc", "libc", @@ -3624,7 +3628,7 @@ dependencies = [ "opentelemetry-proto 0.5.0", "opentelemetry-semantic-conventions", "opentelemetry_sdk 0.22.1", - "prost 0.12.4", + "prost 0.12.3", "thiserror", "tokio", "tonic 0.11.0", @@ -3651,7 +3655,7 @@ checksum = "3a8fddc9b68f5b80dae9d6f510b88e02396f006ad48cac349411fbecc80caae4" dependencies = [ "opentelemetry 0.22.0", "opentelemetry_sdk 0.22.1", - "prost 0.12.4", + "prost 0.12.3", "tonic 0.11.0", ] @@ -3761,12 +3765,12 @@ dependencies = [ [[package]] name = "parking_lot" -version = "0.12.2" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e4af0ca4f6caed20e900d564c242b8e5d4903fdacf31d3daf527b66fe6f42fb" +checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" dependencies = [ "lock_api", - "parking_lot_core 0.9.10", + "parking_lot_core 0.9.9", ] [[package]] @@ -3785,15 +3789,15 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.10" +version = "0.9.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" +checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.5.1", + "redox_syscall 0.4.1", "smallvec", - "windows-targets 0.52.5", + "windows-targets 0.48.5", ] [[package]] @@ -3819,11 +3823,11 @@ dependencies = [ [[package]] name = "pem" -version = "3.0.4" +version = "3.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e459365e590736a54c3fa561947c84837534b8e9af6fc5bf781307e82658fae" +checksum = "1b8fcc794035347fb64beda2d3b462595dd2753e3f268d89c5aae77e8cf2c310" dependencies = [ - "base64 0.22.1", + "base64 0.21.7", "serde", ] @@ -3924,9 +3928,9 @@ dependencies = [ "reqwest", "reqwest-middleware", "reqwest-tracing", - "rustls 0.22.4", + "rustls 0.22.2", "rustls-channel-resolver", - "rustls-pemfile 2.1.2", + "rustls-pemfile 2.1.1", "rusty-s3", "serde", "serde-tuple-vec-map", @@ -3971,7 +3975,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.53", ] [[package]] @@ -3994,12 +3998,12 @@ checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" [[package]] name = "plist" -version = "1.6.1" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9d34169e64b3c7a80c8621a48adaf44e0cf62c78a9b25dd9dd35f1881a17cf9" +checksum = "e5699cc8a63d1aa2b1ee8e12b9ad70ac790d65788cd36101fa37f87ea46c4cef" dependencies = [ "base64 0.21.7", - "indexmap 2.2.6", + "indexmap 2.2.5", "line-wrap", "quick-xml 0.31.0", "serde", @@ -4111,19 +4115,19 @@ dependencies = [ [[package]] name = "prettyplease" -version = "0.2.19" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ac2cf0f2e4f42b49f5ffd07dae8d746508ef7526c13940e5f524012ae6c6550" +checksum = "8d3928fb5db768cb86f891ff014f0144589297e3c6a1aba6ed7cecfdace270c7" dependencies = [ "proc-macro2", - "syn 2.0.60", + "syn 2.0.53", ] [[package]] name = "proc-macro2" -version = "1.0.81" +version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d1597b0c024618f09a9c3b8655b7e430397a36d23fdafec26d6965e9eec3eba" +checksum = "e835ff2298f5721608eb1a980ecaee1aef2c132bf95ecc026a11b7bf3c01c02e" dependencies = [ "unicode-ident", ] @@ -4152,7 +4156,7 @@ dependencies = [ "lazy_static", "libc", "memchr", - "parking_lot 0.12.2", + "parking_lot 0.12.1", "procfs", "protobuf", "thiserror", @@ -4170,12 +4174,12 @@ dependencies = [ [[package]] name = "prost" -version = "0.12.4" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0f5d036824e4761737860779c906171497f6d55681139d8312388f8fe398922" +checksum = "146c289cda302b98a28d40c8b3b90498d6e526dd24ac2ecea73e4e491685b94a" dependencies = [ "bytes", - "prost-derive 0.12.4", + "prost-derive 0.12.3", ] [[package]] @@ -4193,15 +4197,15 @@ dependencies = [ [[package]] name = "prost-derive" -version = "0.12.4" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19de2de2a00075bf566bee3bd4db014b11587e84184d3f7a791bc17f1a8e9e48" +checksum = "efb6c9a1dd1def8e2124d17e83a20af56f1570d6c2d2bd9e266ccb768df3840e" dependencies = [ "anyhow", - "itertools 0.12.1", + "itertools 0.11.0", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.53", ] [[package]] @@ -4215,11 +4219,11 @@ dependencies = [ [[package]] name = "prost-types" -version = "0.12.4" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3235c33eb02c1f1e212abdbe34c78b264b038fb58ca612664343271e36e55ffe" +checksum = "193898f59edcf43c26227dcd4c8427f00d99d61e95dcde58dabd49fa291d470e" dependencies = [ - "prost 0.12.4", + "prost 0.12.3", ] [[package]] @@ -4239,9 +4243,9 @@ dependencies = [ [[package]] name = "quanta" -version = "0.12.3" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e5167a477619228a0b284fac2674e3c388cba90631d7b7de620e6f1fcd08da5" +checksum = "9ca0b7bac0b97248c40bb77288fc52029cf1459c0461ea1b05ee32ccf011de2c" dependencies = [ "crossbeam-utils", "libc", @@ -4274,9 +4278,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.36" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" dependencies = [ "proc-macro2", ] @@ -4319,11 +4323,11 @@ dependencies = [ [[package]] name = "raw-cpuid" -version = "11.0.2" +version = "11.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e29830cbb1290e404f24c73af91c5d8d631ce7e128691e9477556b540cd01ecd" +checksum = "9d86a7c4638d42c44551f4791a20e687dbb4c3de1f33c43dd71e355cd429def1" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.4.2", ] [[package]] @@ -4334,7 +4338,7 @@ checksum = "a25d631e41bfb5fdcde1d4e2215f62f7f0afa3ff11e26563765bd6ea1d229aeb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.53", ] [[package]] @@ -4355,20 +4359,11 @@ dependencies = [ "bitflags 1.3.2", ] -[[package]] -name = "redox_syscall" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "469052894dcb553421e483e4209ee581a45100d31b4018de03e5a7ad86374a7e" -dependencies = [ - "bitflags 2.5.0", -] - [[package]] name = "refinery" -version = "0.8.14" +version = "0.8.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0904191f0566c3d3e0091d5cc8dec22e663d77def2d247b16e7a438b188bf75d" +checksum = "a2783724569d96af53464d0711dff635cab7a4934df5e22e9fbc9e181523b83e" dependencies = [ "refinery-core", "refinery-macros", @@ -4376,9 +4371,9 @@ dependencies = [ [[package]] name = "refinery-core" -version = "0.8.14" +version = "0.8.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bf253999e1899ae476c910b994959e341d84c4389ba9533d3dacbe06df04825" +checksum = "08d6c80329c0455510a8d42fce286ecb4b6bcd8c57e1816d9f2d6bd7379c2cc8" dependencies = [ "async-trait", "cfg-if", @@ -4398,16 +4393,15 @@ dependencies = [ [[package]] name = "refinery-macros" -version = "0.8.14" +version = "0.8.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd81f69687fe8a1fa10995108b3ffc7cdbd63e682a4f8fbfd1020130780d7e17" +checksum = "6ab6e31e166a49d55cb09b62639e5ab9ba2e73f2f124336b06f6c321dc602779" dependencies = [ - "heck 0.4.1", "proc-macro2", "quote", "refinery-core", "regex", - "syn 2.0.60", + "syn 2.0.53", ] [[package]] @@ -4419,7 +4413,7 @@ dependencies = [ "aho-corasick", "memchr", "regex-automata 0.4.6", - "regex-syntax 0.8.3", + "regex-syntax 0.8.2", ] [[package]] @@ -4439,7 +4433,7 @@ checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.3", + "regex-syntax 0.8.2", ] [[package]] @@ -4450,9 +4444,9 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.8.3" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" +checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" [[package]] name = "reqwest" @@ -4593,7 +4587,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b91f7eff05f748767f183df4320a63d6936e9c6107d97c9e6bdd9784f4289c94" dependencies = [ "base64 0.21.7", - "bitflags 2.5.0", + "bitflags 2.4.2", "serde", "serde_derive", ] @@ -4667,11 +4661,11 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.34" +version = "0.38.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" +checksum = "6ea3e1a662af26cd7a3ba09c0297a31af215563ecf42817c98df621387f4e949" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.4.2", "errno", "libc", "linux-raw-sys 0.4.13", @@ -4704,14 +4698,14 @@ dependencies = [ [[package]] name = "rustls" -version = "0.22.4" +version = "0.22.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf4ef73721ac7bcd79b2b315da7779d8fc09718c6b3d2d1b2d94850eb8c18432" +checksum = "e87c9956bd9807afa1f77e0f7594af32566e830e088a5576d27c5b6f30f49d41" dependencies = [ "log", "ring 0.17.8", "rustls-pki-types", - "rustls-webpki 0.102.3", + "rustls-webpki 0.102.2", "subtle", "zeroize", ] @@ -4727,7 +4721,7 @@ dependencies = [ "once_cell", "ring 0.17.8", "rustls-pki-types", - "rustls-webpki 0.102.3", + "rustls-webpki 0.102.2", "subtle", "zeroize", ] @@ -4739,7 +4733,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ffbd1941204442f051576a9a7ea8e8db074ad7fd43db1eb3378c3633f9f9e166" dependencies = [ "nanorand", - "rustls 0.22.4", + "rustls 0.22.2", ] [[package]] @@ -4753,19 +4747,19 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "2.1.2" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29993a25686778eb88d4189742cd713c9bce943bc54251a33509dc63cbacf73d" +checksum = "f48172685e6ff52a556baa527774f61fcaa884f59daf3375c62a3f1cd2549dab" dependencies = [ - "base64 0.22.1", + "base64 0.21.7", "rustls-pki-types", ] [[package]] name = "rustls-pki-types" -version = "1.5.0" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "beb461507cee2c2ff151784c52762cf4d9ff6a61f3e80968600ed24fa837fa54" +checksum = "5ede67b28608b4c60685c7d54122d4400d90f62b40caee7700e700380a390fa8" [[package]] name = "rustls-webpki" @@ -4779,9 +4773,9 @@ dependencies = [ [[package]] name = "rustls-webpki" -version = "0.102.3" +version = "0.102.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3bce581c0dd41bce533ce695a1437fa16a7ab5ac3ccfa99fe1a620a7885eabf" +checksum = "faaa0a62740bedb9b2ef5afa303da42764c012f743917351dc9a237ea1663610" dependencies = [ "aws-lc-rs", "ring 0.17.8", @@ -4791,9 +4785,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.15" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80af6f9131f277a45a3fba6ce8e2258037bb0477a67e610d3c1fe046ab31de47" +checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" [[package]] name = "rusty-s3" @@ -4820,6 +4814,12 @@ version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" +[[package]] +name = "safemem" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef703b7cb59335eae2eb93ceb664c0eb7ea6bf567079d843e09420219668e072" + [[package]] name = "same-file" version = "1.0.6" @@ -4866,9 +4866,9 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.10.0" +version = "2.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "770452e37cad93e0a50d5abc3990d2bc351c36d0328f86cefec2f2fb206eaef6" +checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" dependencies = [ "bitflags 1.3.2", "core-foundation", @@ -4879,9 +4879,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.10.0" +version = "2.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41f3cc463c0ef97e11c3461a9d3787412d30e8e7eb907c79180c4a57bf7c04ef" +checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" dependencies = [ "core-foundation-sys", "libc", @@ -4930,7 +4930,7 @@ checksum = "856f046b9400cee3c8c94ed572ecdb752444c24528c035cd35882aad6f492bcb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.53", ] [[package]] @@ -4939,7 +4939,7 @@ version = "1.0.116" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3e17db7126d17feb94eb3fad46bf1a96b034e8aacbc2e775fe81505f8b0b2813" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.2.5", "itoa", "ryu", "serde", @@ -4985,7 +4985,7 @@ dependencies = [ "chrono", "hex", "indexmap 1.9.3", - "indexmap 2.2.6", + "indexmap 2.2.5", "serde", "serde_derive", "serde_json", @@ -5002,7 +5002,7 @@ dependencies = [ "darling 0.20.8", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.53", ] [[package]] @@ -5015,7 +5015,7 @@ dependencies = [ "futures", "lazy_static", "log", - "parking_lot 0.12.2", + "parking_lot 0.12.1", "serial_test_derive", ] @@ -5027,7 +5027,7 @@ checksum = "91d129178576168c589c9ec973feedf7d3126c01ac2bf08795109aa35b69fb8f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.53", ] [[package]] @@ -5069,9 +5069,9 @@ checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" [[package]] name = "signal-hook-registry" -version = "1.4.2" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" +checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" dependencies = [ "libc", ] @@ -5158,9 +5158,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.13.2" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" +checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" [[package]] name = "smart-default" @@ -5170,14 +5170,14 @@ checksum = "0eb01866308440fc64d6c44d9e86c5cc17adfe33c4d6eed55da9145044d0ffc1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.53", ] [[package]] name = "socket2" -version = "0.5.7" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" +checksum = "05ffd9c0a93b7543e062e759284fcf5f5e3b098501104bfbdde4d404db792871" dependencies = [ "libc", "windows-sys 0.52.0", @@ -5236,7 +5236,7 @@ checksum = "f91138e76242f575eb1d3b38b4f1362f10d3a43f47d182a5b359af488a02293b" dependencies = [ "new_debug_unreachable", "once_cell", - "parking_lot 0.12.2", + "parking_lot 0.12.1", "phf_shared 0.10.0", "precomputed-hash", "serde", @@ -5279,9 +5279,9 @@ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] name = "strsim" -version = "0.11.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" +checksum = "5ee073c9e4cd00e28217186dbe12796d692868f432bf2e97ee73bed0c56dfa01" [[package]] name = "strum" @@ -5299,7 +5299,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.60", + "syn 2.0.53", ] [[package]] @@ -5321,9 +5321,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.60" +version = "2.0.53" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "909518bc7b1c9b779f1bbf07f2929d35af9f0f37e47c6e9ef7f9dddc1e1821f3" +checksum = "7383cd0e49fff4b6b90ca5670bfd3e9d6a733b3f90c686605aa7eec8c4996032" dependencies = [ "proc-macro2", "quote", @@ -5349,7 +5349,7 @@ dependencies = [ "fnv", "once_cell", "plist", - "regex-syntax 0.8.3", + "regex-syntax 0.8.2", "serde", "serde_derive", "serde_json", @@ -5402,7 +5402,7 @@ checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" dependencies = [ "cfg-if", "fastrand", - "rustix 0.38.34", + "rustix 0.38.31", "windows-sys 0.52.0", ] @@ -5443,7 +5443,7 @@ checksum = "d1cd413b5d558b4c5bf3680e324a6fa5014e7b7c067a51e69dbdf47eb7148b66" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.53", ] [[package]] @@ -5458,9 +5458,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.36" +version = "0.3.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" +checksum = "c8248b6521bb14bc45b4067159b9b6ad792e2d6d754d6c41fb50e29fefe38749" dependencies = [ "deranged", "itoa", @@ -5479,9 +5479,9 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.18" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" +checksum = "7ba3a3ef41e6672a2f0f001392bb5dcd3ff0a9992d618ca761a11c3121547774" dependencies = [ "num-conv", "time-core", @@ -5519,7 +5519,7 @@ dependencies = [ "libc", "mio", "num_cpus", - "parking_lot 0.12.2", + "parking_lot 0.12.1", "pin-project-lite", "signal-hook-registry", "socket2", @@ -5546,7 +5546,7 @@ checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.53", ] [[package]] @@ -5572,7 +5572,7 @@ dependencies = [ "futures-channel", "futures-util", "log", - "parking_lot 0.12.2", + "parking_lot 0.12.1", "percent-encoding", "phf 0.11.2", "pin-project-lite", @@ -5593,7 +5593,7 @@ checksum = "0ea13f22eda7127c827983bdaf0d7fff9df21c8817bab02815ac277a21143677" dependencies = [ "futures", "ring 0.17.8", - "rustls 0.22.4", + "rustls 0.22.2", "tokio", "tokio-postgres", "tokio-rustls 0.25.0", @@ -5641,7 +5641,7 @@ version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "775e0c0f0adb3a2f22a00c4745d728b479985fc15ee7ca6a2608388c5569860f" dependencies = [ - "rustls 0.22.4", + "rustls 0.22.2", "rustls-pki-types", "tokio", ] @@ -5703,7 +5703,7 @@ dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.22.12", + "toml_edit 0.22.8", ] [[package]] @@ -5721,7 +5721,7 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.2.5", "serde", "serde_spanned", "toml_datetime", @@ -5730,15 +5730,15 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.22.12" +version = "0.22.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3328d4f68a705b2a4498da1d580585d39a6510f98318a2cec3018a7ec61ddef" +checksum = "c12219811e0c1ba077867254e5ad62ee2c9c190b0d957110750ac0cda1ae96cd" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.2.5", "serde", "serde_spanned", "toml_datetime", - "winnow 0.6.7", + "winnow 0.6.5", ] [[package]] @@ -5819,7 +5819,7 @@ dependencies = [ "hyper-timeout", "percent-encoding", "pin-project", - "prost 0.12.4", + "prost 0.12.3", "tokio", "tokio-stream", "tower", @@ -5846,7 +5846,7 @@ dependencies = [ "hyper-timeout", "percent-encoding", "pin-project", - "prost 0.12.4", + "prost 0.12.3", "tokio", "tokio-stream", "tower", @@ -5938,7 +5938,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.53", ] [[package]] @@ -6101,7 +6101,7 @@ dependencies = [ "Inflector", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.53", "termcolor", ] @@ -6122,7 +6122,7 @@ checksum = "1f718dfaf347dcb5b983bfc87608144b0bad87970aebcbea5ce44d2a30c08e63" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.53", ] [[package]] @@ -6169,9 +6169,9 @@ dependencies = [ [[package]] name = "unicode-width" -version = "0.1.12" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68f5e5f3158ecfd4b8ff6fe086db7c8467a2dfdac97fe420f2b7c4aa97af66d6" +checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" [[package]] name = "unicode-xid" @@ -6308,7 +6308,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.53", "wasm-bindgen-shared", ] @@ -6342,7 +6342,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.53", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -6465,7 +6465,7 @@ dependencies = [ "either", "home", "once_cell", - "rustix 0.38.34", + "rustix 0.38.31", ] [[package]] @@ -6497,11 +6497,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.8" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" +checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" dependencies = [ - "windows-sys 0.52.0", + "winapi", ] [[package]] @@ -6517,7 +6517,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e48a53791691ab099e5e2ad123536d0fff50652600abaf43bbf952894110d0be" dependencies = [ "windows-core", - "windows-targets 0.52.5", + "windows-targets 0.52.4", ] [[package]] @@ -6526,7 +6526,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.52.5", + "windows-targets 0.52.4", ] [[package]] @@ -6553,7 +6553,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.5", + "windows-targets 0.52.4", ] [[package]] @@ -6588,18 +6588,17 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.5" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" +checksum = "7dd37b7e5ab9018759f893a1952c9420d060016fc19a472b4bb20d1bdd694d1b" dependencies = [ - "windows_aarch64_gnullvm 0.52.5", - "windows_aarch64_msvc 0.52.5", - "windows_i686_gnu 0.52.5", - "windows_i686_gnullvm", - "windows_i686_msvc 0.52.5", - "windows_x86_64_gnu 0.52.5", - "windows_x86_64_gnullvm 0.52.5", - "windows_x86_64_msvc 0.52.5", + "windows_aarch64_gnullvm 0.52.4", + "windows_aarch64_msvc 0.52.4", + "windows_i686_gnu 0.52.4", + "windows_i686_msvc 0.52.4", + "windows_x86_64_gnu 0.52.4", + "windows_x86_64_gnullvm 0.52.4", + "windows_x86_64_msvc 0.52.4", ] [[package]] @@ -6616,9 +6615,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.5" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" +checksum = "bcf46cf4c365c6f2d1cc93ce535f2c8b244591df96ceee75d8e83deb70a9cac9" [[package]] name = "windows_aarch64_msvc" @@ -6634,9 +6633,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.5" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" +checksum = "da9f259dd3bcf6990b55bffd094c4f7235817ba4ceebde8e6d11cd0c5633b675" [[package]] name = "windows_i686_gnu" @@ -6652,15 +6651,9 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.5" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" - -[[package]] -name = "windows_i686_gnullvm" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" +checksum = "b474d8268f99e0995f25b9f095bc7434632601028cf86590aea5c8a5cb7801d3" [[package]] name = "windows_i686_msvc" @@ -6676,9 +6669,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.5" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" +checksum = "1515e9a29e5bed743cb4415a9ecf5dfca648ce85ee42e15873c3cd8610ff8e02" [[package]] name = "windows_x86_64_gnu" @@ -6694,9 +6687,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.5" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" +checksum = "5eee091590e89cc02ad514ffe3ead9eb6b660aedca2183455434b93546371a03" [[package]] name = "windows_x86_64_gnullvm" @@ -6712,9 +6705,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.5" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" +checksum = "77ca79f2451b49fa9e2af39f0747fe999fcda4f5e241b2898624dca97a1f2177" [[package]] name = "windows_x86_64_msvc" @@ -6730,9 +6723,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.5" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" +checksum = "32b752e52a2da0ddfbdbcc6fceadfeede4c939ed16d13e648833a61dfb611ed8" [[package]] name = "winnow" @@ -6745,9 +6738,9 @@ dependencies = [ [[package]] name = "winnow" -version = "0.6.7" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14b9415ee827af173ebb3f15f9083df5a122eb93572ec28741fb153356ea2578" +checksum = "dffa400e67ed5a4dd237983829e66475f0a4a26938c4b04c21baede6262215b8" dependencies = [ "memchr", ] @@ -6773,7 +6766,7 @@ dependencies = [ "chrono", "der", "hex", - "pem 3.0.4", + "pem 3.0.3", "ring 0.17.8", "signature", "spki", @@ -6830,7 +6823,7 @@ checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.53", ] [[package]] @@ -6850,32 +6843,32 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.53", ] [[package]] name = "zstd" -version = "0.13.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d789b1514203a1120ad2429eae43a7bd32b90976a7bb8a05f7ec02fa88cc23a" +checksum = "bffb3309596d527cfcba7dfc6ed6052f1d39dfbd7c867aa2e865e4a449c10110" dependencies = [ "zstd-safe", ] [[package]] name = "zstd-safe" -version = "7.1.0" +version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cd99b45c6bc03a018c8b8a86025678c87e55526064e38f9df301989dce7ec0a" +checksum = "43747c7422e2924c11144d5229878b98180ef8b06cca4ab5af37afc8a8d8ea3e" dependencies = [ "zstd-sys", ] [[package]] name = "zstd-sys" -version = "2.0.10+zstd.1.5.6" +version = "2.0.9+zstd.1.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c253a4914af5bafc8fa8c86ee400827e83cf6ec01195ec1f1ed8441bf00d65aa" +checksum = "9e16efa8a874a0481a574084d34cc26fdb3b99627480f785888deb6386506656" dependencies = [ "cc", "pkg-config", diff --git a/Cargo.toml b/Cargo.toml index aec09093d..bbdce4a75 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [workspace.package] -version = "0.19.4-beta.6" +version = "0.19.4-beta.7" edition = "2021" description = "A link aggregator for the fediverse" license = "AGPL-3.0" @@ -88,18 +88,18 @@ unused_self = "deny" unwrap_used = "deny" [workspace.dependencies] -lemmy_api = { version = "=0.19.4-beta.6", path = "./crates/api" } -lemmy_api_crud = { version = "=0.19.4-beta.6", path = "./crates/api_crud" } -lemmy_apub = { version = "=0.19.4-beta.6", path = "./crates/apub" } -lemmy_utils = { version = "=0.19.4-beta.6", path = "./crates/utils", default-features = false } -lemmy_db_schema = { version = "=0.19.4-beta.6", path = "./crates/db_schema" } -lemmy_api_common = { version = "=0.19.4-beta.6", path = "./crates/api_common" } -lemmy_routes = { version = "=0.19.4-beta.6", path = "./crates/routes" } -lemmy_db_views = { version = "=0.19.4-beta.6", path = "./crates/db_views" } -lemmy_db_views_actor = { version = "=0.19.4-beta.6", path = "./crates/db_views_actor" } -lemmy_db_views_moderator = { version = "=0.19.4-beta.6", path = "./crates/db_views_moderator" } -lemmy_federate = { version = "=0.19.4-beta.6", path = "./crates/federate" } -activitypub_federation = { version = "0.5.5", default-features = false, features = [ +lemmy_api = { version = "=0.19.4-beta.7", path = "./crates/api" } +lemmy_api_crud = { version = "=0.19.4-beta.7", path = "./crates/api_crud" } +lemmy_apub = { version = "=0.19.4-beta.7", path = "./crates/apub" } +lemmy_utils = { version = "=0.19.4-beta.7", path = "./crates/utils", default-features = false } +lemmy_db_schema = { version = "=0.19.4-beta.7", path = "./crates/db_schema" } +lemmy_api_common = { version = "=0.19.4-beta.7", path = "./crates/api_common" } +lemmy_routes = { version = "=0.19.4-beta.7", path = "./crates/routes" } +lemmy_db_views = { version = "=0.19.4-beta.7", path = "./crates/db_views" } +lemmy_db_views_actor = { version = "=0.19.4-beta.7", path = "./crates/db_views_actor" } +lemmy_db_views_moderator = { version = "=0.19.4-beta.7", path = "./crates/db_views_moderator" } +lemmy_federate = { version = "=0.19.4-beta.7", path = "./crates/federate" } +activitypub_federation = { version = "0.5.6", default-features = false, features = [ "actix-web", ] } diesel = "2.1.6" diff --git a/api_tests/pnpm-lock.yaml b/api_tests/pnpm-lock.yaml index 8dc01c576..42eb612e5 100644 --- a/api_tests/pnpm-lock.yaml +++ b/api_tests/pnpm-lock.yaml @@ -13,13 +13,13 @@ importers: version: 29.5.12 '@types/node': specifier: ^20.12.4 - version: 20.12.7 + version: 20.12.4 '@typescript-eslint/eslint-plugin': specifier: ^7.5.0 - version: 7.5.0(@typescript-eslint/parser@7.5.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5) + version: 7.5.0(@typescript-eslint/parser@7.5.0)(eslint@8.57.0)(typescript@5.4.4) '@typescript-eslint/parser': specifier: ^7.5.0 - version: 7.5.0(eslint@8.57.0)(typescript@5.4.5) + version: 7.5.0(eslint@8.57.0)(typescript@5.4.4) download-file-sync: specifier: ^1.0.4 version: 1.0.4 @@ -31,7 +31,7 @@ importers: version: 5.1.3(eslint@8.57.0)(prettier@3.2.5) jest: specifier: ^29.5.0 - version: 29.7.0(@types/node@20.12.7) + version: 29.7.0(@types/node@20.12.4) lemmy-js-client: specifier: 0.19.4-alpha.18 version: 0.19.4-alpha.18 @@ -40,10 +40,10 @@ importers: version: 3.2.5 ts-jest: specifier: ^29.1.0 - version: 29.1.2(@babel/core@7.23.9)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.23.9))(jest@29.7.0(@types/node@20.12.7))(typescript@5.4.5) + version: 29.1.2(@babel/core@7.23.9)(jest@29.7.0)(typescript@5.4.4) typescript: specifier: ^5.4.4 - version: 5.4.5 + version: 5.4.4 packages: @@ -398,8 +398,8 @@ packages: '@types/json-schema@7.0.15': resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} - '@types/node@20.12.7': - resolution: {integrity: sha512-wq0cICSkRLVaf3UGLMGItu/PtdY7oaXaI/RVU+xliKVOtRna3PRY57ZDfztpDL0n11vfymMUnXv8QwYCO7L1wg==} + '@types/node@20.12.4': + resolution: {integrity: sha512-E+Fa9z3wSQpzgYQdYmme5X3OTuejnnTx88A6p6vkkJosR3KBz+HpE3kqNm98VE6cfLFcISx7zW7MsJkH6KwbTw==} '@types/semver@7.5.8': resolution: {integrity: sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==} @@ -1539,8 +1539,8 @@ packages: resolution: {integrity: sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==} engines: {node: '>=10'} - typescript@5.4.5: - resolution: {integrity: sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==} + typescript@5.4.4: + resolution: {integrity: sha512-dGE2Vv8cpVvw28v8HCPqyb08EzbBURxDpuhJvTrusShUfGnhHBafDsLdS1EhhxyL6BJQE+2cT3dDPAv+MQ6oLw==} engines: {node: '>=14.17'} hasBin: true @@ -1857,7 +1857,7 @@ snapshots: '@jest/console@29.7.0': dependencies: '@jest/types': 29.6.3 - '@types/node': 20.12.7 + '@types/node': 20.12.4 chalk: 4.1.2 jest-message-util: 29.7.0 jest-util: 29.7.0 @@ -1870,14 +1870,14 @@ snapshots: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.12.7 + '@types/node': 20.12.4 ansi-escapes: 4.3.2 chalk: 4.1.2 ci-info: 3.9.0 exit: 0.1.2 graceful-fs: 4.2.11 jest-changed-files: 29.7.0 - jest-config: 29.7.0(@types/node@20.12.7) + jest-config: 29.7.0(@types/node@20.12.4) jest-haste-map: 29.7.0 jest-message-util: 29.7.0 jest-regex-util: 29.6.3 @@ -1902,7 +1902,7 @@ snapshots: dependencies: '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.12.7 + '@types/node': 20.12.4 jest-mock: 29.7.0 '@jest/expect-utils@29.7.0': @@ -1920,7 +1920,7 @@ snapshots: dependencies: '@jest/types': 29.6.3 '@sinonjs/fake-timers': 10.3.0 - '@types/node': 20.12.7 + '@types/node': 20.12.4 jest-message-util: 29.7.0 jest-mock: 29.7.0 jest-util: 29.7.0 @@ -1942,7 +1942,7 @@ snapshots: '@jest/transform': 29.7.0 '@jest/types': 29.6.3 '@jridgewell/trace-mapping': 0.3.22 - '@types/node': 20.12.7 + '@types/node': 20.12.4 chalk: 4.1.2 collect-v8-coverage: 1.0.2 exit: 0.1.2 @@ -2012,7 +2012,7 @@ snapshots: '@jest/schemas': 29.6.3 '@types/istanbul-lib-coverage': 2.0.6 '@types/istanbul-reports': 3.0.4 - '@types/node': 20.12.7 + '@types/node': 20.12.4 '@types/yargs': 17.0.32 chalk: 4.1.2 @@ -2080,7 +2080,7 @@ snapshots: '@types/graceful-fs@4.1.9': dependencies: - '@types/node': 20.12.7 + '@types/node': 20.12.4 '@types/istanbul-lib-coverage@2.0.6': {} @@ -2099,7 +2099,7 @@ snapshots: '@types/json-schema@7.0.15': {} - '@types/node@20.12.7': + '@types/node@20.12.4': dependencies: undici-types: 5.26.5 @@ -2113,13 +2113,13 @@ snapshots: dependencies: '@types/yargs-parser': 21.0.3 - '@typescript-eslint/eslint-plugin@7.5.0(@typescript-eslint/parser@7.5.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5)': + '@typescript-eslint/eslint-plugin@7.5.0(@typescript-eslint/parser@7.5.0)(eslint@8.57.0)(typescript@5.4.4)': dependencies: '@eslint-community/regexpp': 4.10.0 - '@typescript-eslint/parser': 7.5.0(eslint@8.57.0)(typescript@5.4.5) + '@typescript-eslint/parser': 7.5.0(eslint@8.57.0)(typescript@5.4.4) '@typescript-eslint/scope-manager': 7.5.0 - '@typescript-eslint/type-utils': 7.5.0(eslint@8.57.0)(typescript@5.4.5) - '@typescript-eslint/utils': 7.5.0(eslint@8.57.0)(typescript@5.4.5) + '@typescript-eslint/type-utils': 7.5.0(eslint@8.57.0)(typescript@5.4.4) + '@typescript-eslint/utils': 7.5.0(eslint@8.57.0)(typescript@5.4.4) '@typescript-eslint/visitor-keys': 7.5.0 debug: 4.3.4 eslint: 8.57.0 @@ -2127,22 +2127,20 @@ snapshots: ignore: 5.3.1 natural-compare: 1.4.0 semver: 7.6.0 - ts-api-utils: 1.3.0(typescript@5.4.5) - optionalDependencies: - typescript: 5.4.5 + ts-api-utils: 1.3.0(typescript@5.4.4) + typescript: 5.4.4 transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@7.5.0(eslint@8.57.0)(typescript@5.4.5)': + '@typescript-eslint/parser@7.5.0(eslint@8.57.0)(typescript@5.4.4)': dependencies: '@typescript-eslint/scope-manager': 7.5.0 '@typescript-eslint/types': 7.5.0 - '@typescript-eslint/typescript-estree': 7.5.0(typescript@5.4.5) + '@typescript-eslint/typescript-estree': 7.5.0(typescript@5.4.4) '@typescript-eslint/visitor-keys': 7.5.0 debug: 4.3.4 eslint: 8.57.0 - optionalDependencies: - typescript: 5.4.5 + typescript: 5.4.4 transitivePeerDependencies: - supports-color @@ -2151,21 +2149,20 @@ snapshots: '@typescript-eslint/types': 7.5.0 '@typescript-eslint/visitor-keys': 7.5.0 - '@typescript-eslint/type-utils@7.5.0(eslint@8.57.0)(typescript@5.4.5)': + '@typescript-eslint/type-utils@7.5.0(eslint@8.57.0)(typescript@5.4.4)': dependencies: - '@typescript-eslint/typescript-estree': 7.5.0(typescript@5.4.5) - '@typescript-eslint/utils': 7.5.0(eslint@8.57.0)(typescript@5.4.5) + '@typescript-eslint/typescript-estree': 7.5.0(typescript@5.4.4) + '@typescript-eslint/utils': 7.5.0(eslint@8.57.0)(typescript@5.4.4) debug: 4.3.4 eslint: 8.57.0 - ts-api-utils: 1.3.0(typescript@5.4.5) - optionalDependencies: - typescript: 5.4.5 + ts-api-utils: 1.3.0(typescript@5.4.4) + typescript: 5.4.4 transitivePeerDependencies: - supports-color '@typescript-eslint/types@7.5.0': {} - '@typescript-eslint/typescript-estree@7.5.0(typescript@5.4.5)': + '@typescript-eslint/typescript-estree@7.5.0(typescript@5.4.4)': dependencies: '@typescript-eslint/types': 7.5.0 '@typescript-eslint/visitor-keys': 7.5.0 @@ -2174,20 +2171,19 @@ snapshots: is-glob: 4.0.3 minimatch: 9.0.3 semver: 7.6.0 - ts-api-utils: 1.3.0(typescript@5.4.5) - optionalDependencies: - typescript: 5.4.5 + ts-api-utils: 1.3.0(typescript@5.4.4) + typescript: 5.4.4 transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@7.5.0(eslint@8.57.0)(typescript@5.4.5)': + '@typescript-eslint/utils@7.5.0(eslint@8.57.0)(typescript@5.4.4)': dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) '@types/json-schema': 7.0.15 '@types/semver': 7.5.8 '@typescript-eslint/scope-manager': 7.5.0 '@typescript-eslint/types': 7.5.0 - '@typescript-eslint/typescript-estree': 7.5.0(typescript@5.4.5) + '@typescript-eslint/typescript-estree': 7.5.0(typescript@5.4.4) eslint: 8.57.0 semver: 7.6.0 transitivePeerDependencies: @@ -2378,13 +2374,13 @@ snapshots: convert-source-map@2.0.0: {} - create-jest@29.7.0(@types/node@20.12.7): + create-jest@29.7.0(@types/node@20.12.4): dependencies: '@jest/types': 29.6.3 chalk: 4.1.2 exit: 0.1.2 graceful-fs: 4.2.11 - jest-config: 29.7.0(@types/node@20.12.7) + jest-config: 29.7.0(@types/node@20.12.4) jest-util: 29.7.0 prompts: 2.4.2 transitivePeerDependencies: @@ -2751,7 +2747,7 @@ snapshots: '@jest/expect': 29.7.0 '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.12.7 + '@types/node': 20.12.4 chalk: 4.1.2 co: 4.6.0 dedent: 1.5.1 @@ -2771,16 +2767,16 @@ snapshots: - babel-plugin-macros - supports-color - jest-cli@29.7.0(@types/node@20.12.7): + jest-cli@29.7.0(@types/node@20.12.4): dependencies: '@jest/core': 29.7.0 '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 chalk: 4.1.2 - create-jest: 29.7.0(@types/node@20.12.7) + create-jest: 29.7.0(@types/node@20.12.4) exit: 0.1.2 import-local: 3.1.0 - jest-config: 29.7.0(@types/node@20.12.7) + jest-config: 29.7.0(@types/node@20.12.4) jest-util: 29.7.0 jest-validate: 29.7.0 yargs: 17.7.2 @@ -2790,11 +2786,12 @@ snapshots: - supports-color - ts-node - jest-config@29.7.0(@types/node@20.12.7): + jest-config@29.7.0(@types/node@20.12.4): dependencies: '@babel/core': 7.23.9 '@jest/test-sequencer': 29.7.0 '@jest/types': 29.6.3 + '@types/node': 20.12.4 babel-jest: 29.7.0(@babel/core@7.23.9) chalk: 4.1.2 ci-info: 3.9.0 @@ -2814,8 +2811,6 @@ snapshots: pretty-format: 29.7.0 slash: 3.0.0 strip-json-comments: 3.1.1 - optionalDependencies: - '@types/node': 20.12.7 transitivePeerDependencies: - babel-plugin-macros - supports-color @@ -2844,7 +2839,7 @@ snapshots: '@jest/environment': 29.7.0 '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.12.7 + '@types/node': 20.12.4 jest-mock: 29.7.0 jest-util: 29.7.0 @@ -2854,7 +2849,7 @@ snapshots: dependencies: '@jest/types': 29.6.3 '@types/graceful-fs': 4.1.9 - '@types/node': 20.12.7 + '@types/node': 20.12.4 anymatch: 3.1.3 fb-watchman: 2.0.2 graceful-fs: 4.2.11 @@ -2893,11 +2888,11 @@ snapshots: jest-mock@29.7.0: dependencies: '@jest/types': 29.6.3 - '@types/node': 20.12.7 + '@types/node': 20.12.4 jest-util: 29.7.0 jest-pnp-resolver@1.2.3(jest-resolve@29.7.0): - optionalDependencies: + dependencies: jest-resolve: 29.7.0 jest-regex-util@29.6.3: {} @@ -2928,7 +2923,7 @@ snapshots: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.12.7 + '@types/node': 20.12.4 chalk: 4.1.2 emittery: 0.13.1 graceful-fs: 4.2.11 @@ -2956,7 +2951,7 @@ snapshots: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.12.7 + '@types/node': 20.12.4 chalk: 4.1.2 cjs-module-lexer: 1.2.3 collect-v8-coverage: 1.0.2 @@ -3002,7 +2997,7 @@ snapshots: jest-util@29.7.0: dependencies: '@jest/types': 29.6.3 - '@types/node': 20.12.7 + '@types/node': 20.12.4 chalk: 4.1.2 ci-info: 3.9.0 graceful-fs: 4.2.11 @@ -3021,7 +3016,7 @@ snapshots: dependencies: '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.12.7 + '@types/node': 20.12.4 ansi-escapes: 4.3.2 chalk: 4.1.2 emittery: 0.13.1 @@ -3030,17 +3025,17 @@ snapshots: jest-worker@29.7.0: dependencies: - '@types/node': 20.12.7 + '@types/node': 20.12.4 jest-util: 29.7.0 merge-stream: 2.0.0 supports-color: 8.1.1 - jest@29.7.0(@types/node@20.12.7): + jest@29.7.0(@types/node@20.12.4): dependencies: '@jest/core': 29.7.0 '@jest/types': 29.6.3 import-local: 3.1.0 - jest-cli: 29.7.0(@types/node@20.12.7) + jest-cli: 29.7.0(@types/node@20.12.4) transitivePeerDependencies: - '@types/node' - babel-plugin-macros @@ -3362,26 +3357,23 @@ snapshots: dependencies: is-number: 7.0.0 - ts-api-utils@1.3.0(typescript@5.4.5): + ts-api-utils@1.3.0(typescript@5.4.4): dependencies: - typescript: 5.4.5 + typescript: 5.4.4 - ts-jest@29.1.2(@babel/core@7.23.9)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.23.9))(jest@29.7.0(@types/node@20.12.7))(typescript@5.4.5): + ts-jest@29.1.2(@babel/core@7.23.9)(jest@29.7.0)(typescript@5.4.4): dependencies: + '@babel/core': 7.23.9 bs-logger: 0.2.6 fast-json-stable-stringify: 2.1.0 - jest: 29.7.0(@types/node@20.12.7) + jest: 29.7.0(@types/node@20.12.4) jest-util: 29.7.0 json5: 2.2.3 lodash.memoize: 4.1.2 make-error: 1.3.6 semver: 7.5.4 - typescript: 5.4.5 + typescript: 5.4.4 yargs-parser: 21.1.1 - optionalDependencies: - '@babel/core': 7.23.9 - '@jest/types': 29.6.3 - babel-jest: 29.7.0(@babel/core@7.23.9) tslib@2.6.2: {} @@ -3395,7 +3387,7 @@ snapshots: type-fest@0.21.3: {} - typescript@5.4.5: {} + typescript@5.4.4: {} undici-types@5.26.5: {} diff --git a/crates/api/src/local_user/add_admin.rs b/crates/api/src/local_user/add_admin.rs index cd827454e..7db2e5653 100644 --- a/crates/api/src/local_user/add_admin.rs +++ b/crates/api/src/local_user/add_admin.rs @@ -29,7 +29,7 @@ pub async fn add_admin( .await? .ok_or(LemmyErrorType::ObjectNotLocal)?; - let added_admin = LocalUser::update( + LocalUser::update( &mut context.pool(), added_local_user.local_user.id, &LocalUserUpdateForm { @@ -43,7 +43,7 @@ pub async fn add_admin( // Mod tables let form = ModAddForm { mod_person_id: local_user_view.person.id, - other_person_id: added_admin.person_id, + other_person_id: added_local_user.person.id, removed: Some(!data.added), }; diff --git a/crates/api/src/local_user/save_settings.rs b/crates/api/src/local_user/save_settings.rs index 0805eb697..02b173051 100644 --- a/crates/api/src/local_user/save_settings.rs +++ b/crates/api/src/local_user/save_settings.rs @@ -141,11 +141,7 @@ pub async fn save_user_settings( ..Default::default() }; - // Ignore errors, because 'no fields updated' will return an error. - // https://github.com/LemmyNet/lemmy/issues/4076 - LocalUser::update(&mut context.pool(), local_user_id, &local_user_form) - .await - .ok(); + LocalUser::update(&mut context.pool(), local_user_id, &local_user_form).await?; // Update the vote display modes let vote_display_modes_form = LocalUserVoteDisplayModeUpdateForm { diff --git a/crates/api/src/local_user/verify_email.rs b/crates/api/src/local_user/verify_email.rs index da490bf63..5f38ffc12 100644 --- a/crates/api/src/local_user/verify_email.rs +++ b/crates/api/src/local_user/verify_email.rs @@ -9,12 +9,10 @@ use lemmy_db_schema::{ source::{ email_verification::EmailVerification, local_user::{LocalUser, LocalUserUpdateForm}, - person::Person, }, - traits::Crud, RegistrationMode, }; -use lemmy_db_views::structs::SiteView; +use lemmy_db_views::structs::{LocalUserView, SiteView}; use lemmy_utils::error::{LemmyErrorType, LemmyResult}; pub async fn verify_email( @@ -38,7 +36,7 @@ pub async fn verify_email( }; let local_user_id = verification.local_user_id; - let local_user = LocalUser::update(&mut context.pool(), local_user_id, &form).await?; + LocalUser::update(&mut context.pool(), local_user_id, &form).await?; EmailVerification::delete_old_tokens_for_local_user(&mut context.pool(), local_user_id).await?; @@ -46,12 +44,16 @@ pub async fn verify_email( if site_view.local_site.registration_mode == RegistrationMode::RequireApplication && site_view.local_site.application_email_admins { - let person = Person::read(&mut context.pool(), local_user.person_id) + let local_user = LocalUserView::read(&mut context.pool(), local_user_id) .await? .ok_or(LemmyErrorType::CouldntFindPerson)?; - send_new_applicant_email_to_admins(&person.name, &mut context.pool(), context.settings()) - .await?; + send_new_applicant_email_to_admins( + &local_user.person.name, + &mut context.pool(), + context.settings(), + ) + .await?; } Ok(Json(SuccessResponse::default())) diff --git a/crates/api_common/src/person.rs b/crates/api_common/src/person.rs index 4f5aea2be..6f020df6d 100644 --- a/crates/api_common/src/person.rs +++ b/crates/api_common/src/person.rs @@ -40,7 +40,7 @@ pub struct Register { pub username: String, pub password: Sensitive, pub password_verify: Sensitive, - pub show_nsfw: bool, + pub show_nsfw: Option, /// email is mandatory if email verification is enabled on the server pub email: Option>, /// The UUID of the captcha item. diff --git a/crates/api_crud/src/user/create.rs b/crates/api_crud/src/user/create.rs index 6640e9e53..206ce241b 100644 --- a/crates/api_crud/src/user/create.rs +++ b/crates/api_crud/src/user/create.rs @@ -142,12 +142,17 @@ pub async fn register( .map(|lang_str| lang_str.split('-').next().unwrap_or_default().to_string()) .collect(); + // Show nsfw content if param is true, or if content_warning exists + let show_nsfw = data + .show_nsfw + .unwrap_or(site_view.site.content_warning.is_some()); + // Create the local user let local_user_form = LocalUserInsertForm::builder() .person_id(inserted_person.id) .email(data.email.as_deref().map(str::to_lowercase)) .password_encrypted(data.password.to_string()) - .show_nsfw(Some(data.show_nsfw)) + .show_nsfw(Some(show_nsfw)) .accepted_application(accepted_application) .default_listing_type(Some(local_site.default_post_listing_type)) .post_listing_mode(Some(local_site.default_post_listing_mode)) diff --git a/crates/apub/assets/wordpress/activities/announce.json b/crates/apub/assets/wordpress/activities/announce.json new file mode 100644 index 000000000..985dec307 --- /dev/null +++ b/crates/apub/assets/wordpress/activities/announce.json @@ -0,0 +1,49 @@ +{ + "@context": ["https://www.w3.org/ns/activitystreams"], + "id": "https://pfefferle.org/lemmy-part-4/#activity#activity", + "type": "Announce", + "audience": "https://pfefferle.org/@pfefferle.org", + "published": "2024-05-03T12:32:29Z", + "updated": "2024-05-06T08:20:33Z", + "to": [ + "https://www.w3.org/ns/activitystreams#Public", + "https://pfefferle.org/wp-json/activitypub/1.0/actors/1/followers" + ], + "cc": [], + "object": { + "id": "https://pfefferle.org/lemmy-part-4/#activity", + "type": "Update", + "audience": "https://pfefferle.org/@pfefferle.org", + "published": "2024-05-03T12:32:29Z", + "updated": "2024-05-06T08:20:33Z", + "to": [ + "https://www.w3.org/ns/activitystreams#Public", + "https://pfefferle.org/wp-json/activitypub/1.0/actors/1/followers" + ], + "cc": [], + "object": { + "id": "https://pfefferle.org/lemmy-part-4/", + "type": "Article", + "attachment": [], + "attributedTo": "https://pfefferle.org/author/pfefferle/", + "audience": "https://pfefferle.org/@pfefferle.org", + "content": "\u003Cp\u003EIdentifies one or more entities that represent the total population of entities for which the object can considered to be relevant. Identifies one or more entities that represent the total population of entities for which the object can considered to be relevant.Identifies one or more entities that represent the total population of entities for which the object can considered to be relevant.Identifies one or more entities that represent the total population of entities for which the object can considered to be relevant.Identifies one or more entities that represent the total population of entities for which the object can considered to be relevant.Identifies one or more entities that represent the total population of entities for which the object can considered to be relevant.Identifies one or more entities that represent the total population of entities for which the object can considered to be relevant. \u003C/p\u003E", + "contentMap": { + "en": "\u003Cp\u003EIdentifies one or more entities that represent the total population of entities for which the object can considered to be relevant. Identifies one or more entities that represent the total population of entities for which the object can considered to be relevant.Identifies one or more entities that represent the total population of entities for which the object can considered to be relevant.Identifies one or more entities that represent the total population of entities for which the object can considered to be relevant.Identifies one or more entities that represent the total population of entities for which the object can considered to be relevant.Identifies one or more entities that represent the total population of entities for which the object can considered to be relevant.Identifies one or more entities that represent the total population of entities for which the object can considered to be relevant. \u003C/p\u003E" + }, + "name": "Lemmy (Part 4)", + "published": "2024-05-03T12:32:29Z", + "summary": "Identifies one or more entities that represent the total population of entities for which the object can considered to be relevant. Identifies one or more entities that represent the total population of entities for which the object can considered to be relevant.Identifies one or more entities that represent the total population of entities for which the object can considered to be relevant.Identifies one or more entities that represent the total population of entities for which the object [...]", + "tag": [], + "updated": "2024-05-06T08:20:33Z", + "url": "https://pfefferle.org/lemmy-part-4/", + "to": [ + "https://www.w3.org/ns/activitystreams#Public", + "https://pfefferle.org/wp-json/activitypub/1.0/actors/1/followers" + ], + "cc": [] + }, + "actor": "https://pfefferle.org/author/pfefferle/" + }, + "actor": "https://pfefferle.org/@pfefferle.org" +} diff --git a/crates/apub/assets/wordpress/objects/group.json b/crates/apub/assets/wordpress/objects/group.json new file mode 100644 index 000000000..35f2af0c4 --- /dev/null +++ b/crates/apub/assets/wordpress/objects/group.json @@ -0,0 +1,66 @@ +{ + "@context": [ + "https://www.w3.org/ns/activitystreams", + "https://w3id.org/security/v1", + "https://purl.archive.org/socialweb/webfinger", + { + "schema": "http://schema.org#", + "toot": "http://joinmastodon.org/ns#", + "webfinger": "https://webfinger.net/#", + "lemmy": "https://join-lemmy.org/ns#", + "manuallyApprovesFollowers": "as:manuallyApprovesFollowers", + "PropertyValue": "schema:PropertyValue", + "value": "schema:value", + "Hashtag": "as:Hashtag", + "featured": { + "@id": "toot:featured", + "@type": "@id" + }, + "featuredTags": { + "@id": "toot:featuredTags", + "@type": "@id" + }, + "moderators": { + "@id": "lemmy:moderators", + "@type": "@id" + }, + "postingRestrictedToMods": "lemmy:postingRestrictedToMods", + "discoverable": "toot:discoverable", + "indexable": "toot:indexable", + "resource": "webfinger:resource" + } + ], + "id": "https://pfefferle.org/@pfefferle.org", + "type": "Group", + "attachment": [], + "attributedTo": "https://pfefferle.org/wp-json/activitypub/1.0/collections/moderators", + "name": "Matthias Pfefferle", + "icon": { + "type": "Image", + "url": "https://pfefferle.org/wp-content/uploads/2023/06/cropped-BeLItBV-_400x400.jpg" + }, + "published": "2024-04-03T16:58:22Z", + "summary": "

Webworker, blogger und podcaster

\n", + "tag": [], + "url": "https://pfefferle.org/@pfefferle.org", + "inbox": "https://pfefferle.org/wp-json/activitypub/1.0/users/0/inbox", + "outbox": "https://pfefferle.org/wp-json/activitypub/1.0/users/0/outbox", + "following": "https://pfefferle.org/wp-json/activitypub/1.0/users/0/following", + "followers": "https://pfefferle.org/wp-json/activitypub/1.0/users/0/followers", + "preferredUsername": "pfefferle.org", + "endpoints": { + "sharedInbox": "https://pfefferle.org/wp-json/activitypub/1.0/inbox" + }, + "publicKey": { + "id": "https://pfefferle.org/@pfefferle.org#main-key", + "owner": "https://pfefferle.org/@pfefferle.org", + "publicKeyPem": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuq8xeLMFcaCwPFBhgMRE\n/dDh2XKoNXFXnixctmK8BXSuuLMxucm3I/8NyhIvb3LqU+uP1fO8F0ecUbk2sN+x\nKag5vIV6yKXzJ8ILMWQ9AaELpXDmMZqL0zal0LUJRAOkDgPDovDAoq6tx++yDoV0\njdVbf9CoZKit1cz2ZrEuE5dswq3J/z9+c6POkhCkWEX5TPJzkOrmnjkvrXxGHUJ2\nA3+P+VaZhd5cmvqYosSpYNJshxCdev12pIF78OnYLiYiyXlgGHU+7uQR0M4tTcij\n6cUdLkms9m+b6H3ctXntPn410e5YLFPldjAYzQB5wHVdFZsWtyrbqfYdCa+KkKpA\nvwIDAQAB\n-----END PUBLIC KEY-----\n" + }, + "manuallyApprovesFollowers": false, + "featured": "https://pfefferle.org/wp-json/activitypub/1.0/users/0/collections/featured", + "moderators": "https://pfefferle.org/wp-json/activitypub/1.0/collections/moderators", + "discoverable": true, + "indexable": true, + "webfinger": "pfefferle.org@pfefferle.org", + "postingRestrictedToMods": true +} diff --git a/crates/apub/assets/wordpress/objects/note.json b/crates/apub/assets/wordpress/objects/note.json new file mode 100644 index 000000000..5b4b24da0 --- /dev/null +++ b/crates/apub/assets/wordpress/objects/note.json @@ -0,0 +1,24 @@ +{ + "@context": [ + "https://www.w3.org/ns/activitystreams", + { + "Hashtag": "as:Hashtag" + } + ], + "id": "https://pfefferle.org?c=148", + "type": "Note", + "attributedTo": "https://pfefferle.org/author/pfefferle/", + "content": "

Nice! Hello from WordPress!

", + "contentMap": { + "en": "

Nice! Hello from WordPress!

" + }, + "inReplyTo": "https://socialhub.activitypub.rocks/ap/object/ce040f1ead95964f6dbbf1084b81432d", + "published": "2024-04-30T15:21:13Z", + "tag": [], + "url": "https://pfefferle.org?c=148", + "to": [ + "https://www.w3.org/ns/activitystreams#Public", + "https://pfefferle.org/wp-json/activitypub/1.0/users/0/followers" + ], + "cc": [] +} diff --git a/crates/apub/assets/wordpress/objects/page.json b/crates/apub/assets/wordpress/objects/page.json new file mode 100644 index 000000000..1e8f4be3c --- /dev/null +++ b/crates/apub/assets/wordpress/objects/page.json @@ -0,0 +1,26 @@ +{ + "@context": [ + "https://www.w3.org/ns/activitystreams", + { + "Hashtag": "as:Hashtag" + } + ], + "id": "https://pfefferle.org/this-is-a-test-federation/", + "type": "Article", + "attachment": [], + "attributedTo": "https://pfefferle.org/author/pfefferle/", + "content": "

with Discource!

", + "contentMap": { + "en": "

with Discource!

" + }, + "name": "This is a test-federation", + "published": "2024-04-30T15:16:41Z", + "summary": "with Discource! [...]", + "tag": [], + "url": "https://pfefferle.org/this-is-a-test-federation/", + "to": [ + "https://www.w3.org/ns/activitystreams#Public", + "https://pfefferle.org/wp-json/activitypub/1.0/users/1/followers" + ], + "cc": [] +} diff --git a/crates/apub/assets/wordpress/objects/person.json b/crates/apub/assets/wordpress/objects/person.json new file mode 100644 index 000000000..6c74b53bf --- /dev/null +++ b/crates/apub/assets/wordpress/objects/person.json @@ -0,0 +1,74 @@ +{ + "@context": [ + "https://www.w3.org/ns/activitystreams", + "https://w3id.org/security/v1", + "https://purl.archive.org/socialweb/webfinger", + { + "schema": "http://schema.org#", + "toot": "http://joinmastodon.org/ns#", + "webfinger": "https://webfinger.net/#", + "lemmy": "https://join-lemmy.org/ns#", + "manuallyApprovesFollowers": "as:manuallyApprovesFollowers", + "PropertyValue": "schema:PropertyValue", + "value": "schema:value", + "Hashtag": "as:Hashtag", + "featured": { + "@id": "toot:featured", + "@type": "@id" + }, + "featuredTags": { + "@id": "toot:featuredTags", + "@type": "@id" + }, + "moderators": { + "@id": "lemmy:moderators", + "@type": "@id" + }, + "postingRestrictedToMods": "lemmy:postingRestrictedToMods", + "discoverable": "toot:discoverable", + "indexable": "toot:indexable", + "resource": "webfinger:resource" + } + ], + "id": "https://pfefferle.org/author/pfefferle/", + "type": "Person", + "attachment": [ + { + "type": "PropertyValue", + "name": "Blog", + "value": "pfefferle.org" + }, + { + "type": "PropertyValue", + "name": "Profile", + "value": "pfefferle.org" + } + ], + "name": "Matthias Pfefferle", + "icon": { + "type": "Image", + "url": "https://secure.gravatar.com/avatar/a2bdca7870e859658cece96c044b3be5?s=120&d=mm&r=g" + }, + "published": "2014-02-10T15:23:08Z", + "summary": "

Ich arbeite als Open Web Lead für Automattic.

\n", + "tag": [], + "url": "https://pfefferle.org/author/pfefferle/", + "inbox": "https://pfefferle.org/wp-json/activitypub/1.0/users/1/inbox", + "outbox": "https://pfefferle.org/wp-json/activitypub/1.0/users/1/outbox", + "following": "https://pfefferle.org/wp-json/activitypub/1.0/users/1/following", + "followers": "https://pfefferle.org/wp-json/activitypub/1.0/users/1/followers", + "preferredUsername": "matthias", + "endpoints": { + "sharedInbox": "https://pfefferle.org/wp-json/activitypub/1.0/inbox" + }, + "publicKey": { + "id": "https://pfefferle.org/author/pfefferle/#main-key", + "owner": "https://pfefferle.org/author/pfefferle/", + "publicKeyPem": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvTA5RA40nOsso04RSwyX\nHXTojRPUMlIlArDcSy3M5GUJp9/xbxSUOdBjqd31KKB1GIi3vrLmD1Qi/ZqS95Qy\nw2Zd3xOsCg+o9bsyOG+O6Y8Lu+HEB5JKLUbNHdiSviakJ8wGadH9Wm4WIiN20y+q\n/u6lgxgiWfZ2CFCN6SOc28fUKi9NmKvXK+M12BhFfy1tC5KWXKDm0UbfI1+dmqhR\n3Ffe6vEsCI/YIVVdWxQ9kouOd0XSHOGdslktkepRO7IP9i9TdwyeCa0WWRoeO5Wa\ntVpc1Y0WuNbTM2ksIXTg0G+rO1/6KO/hrHnGu3RCfb/ZIHK5L/aWYb9B3PG3LyKV\n+wIDAQAB\n-----END PUBLIC KEY-----\n" + }, + "manuallyApprovesFollowers": false, + "featured": "https://pfefferle.org/wp-json/activitypub/1.0/users/1/collections/featured", + "discoverable": true, + "indexable": true, + "webfinger": "matthias@pfefferle.org" +} diff --git a/crates/apub/src/http/mod.rs b/crates/apub/src/http/mod.rs index 8aba7832f..6303dd1b0 100644 --- a/crates/apub/src/http/mod.rs +++ b/crates/apub/src/http/mod.rs @@ -20,7 +20,8 @@ use lemmy_db_schema::{ }; use lemmy_utils::error::{LemmyErrorType, LemmyResult}; use serde::{Deserialize, Serialize}; -use std::ops::Deref; +use std::{ops::Deref, time::Duration}; +use tokio::time::timeout; use url::Url; mod comment; @@ -30,13 +31,22 @@ mod post; pub mod routes; pub mod site; +const INCOMING_ACTIVITY_TIMEOUT: Duration = Duration::from_secs(9); + pub async fn shared_inbox( request: HttpRequest, body: Bytes, data: Data, ) -> LemmyResult { - receive_activity::(request, body, &data) + let receive_fut = + receive_activity::(request, body, &data); + // Set a timeout shorter than `REQWEST_TIMEOUT` for processing incoming activities. This is to + // avoid taking a long time to process an incoming activity when a required data fetch times out. + // In this case our own instance would timeout and be marked as dead by the sender. Better to + // consider the activity broken and move on. + timeout(INCOMING_ACTIVITY_TIMEOUT, receive_fut) .await + .map_err(|_| LemmyErrorType::InboxTimeout)? } /// Convert the data to json and turn it into an HTTP Response with the correct ActivityPub diff --git a/crates/apub/src/objects/instance.rs b/crates/apub/src/objects/instance.rs index ddfeb8ca2..2f01609a6 100644 --- a/crates/apub/src/objects/instance.rs +++ b/crates/apub/src/objects/instance.rs @@ -100,7 +100,7 @@ impl Object for ApubSite { kind: ApplicationType::Application, id: self.id().into(), name: self.name.clone(), - preferred_username: data.domain().to_string(), + preferred_username: Some(data.domain().to_string()), content: self.sidebar.as_ref().map(|d| markdown_to_html(d)), source: self.sidebar.clone().map(Source::new), summary: self.description.clone(), diff --git a/crates/apub/src/protocol/activities/mod.rs b/crates/apub/src/protocol/activities/mod.rs index 024f08929..ce0808ee9 100644 --- a/crates/apub/src/protocol/activities/mod.rs +++ b/crates/apub/src/protocol/activities/mod.rs @@ -96,4 +96,10 @@ mod tests { test_json::("assets/mbin/activities/flag.json")?; Ok(()) } + + #[test] + fn test_parse_wordpress_activities() -> LemmyResult<()> { + test_json::("assets/wordpress/activities/announce.json")?; + Ok(()) + } } diff --git a/crates/apub/src/protocol/objects/instance.rs b/crates/apub/src/protocol/objects/instance.rs index 8f6a0f368..1f21e76da 100644 --- a/crates/apub/src/protocol/objects/instance.rs +++ b/crates/apub/src/protocol/objects/instance.rs @@ -22,7 +22,7 @@ pub struct Instance { /// site name pub(crate) name: String, /// instance domain, necessary for mastodon authorized fetch - pub(crate) preferred_username: String, + pub(crate) preferred_username: Option, pub(crate) inbox: Url, /// mandatory field in activitypub, lemmy currently serves an empty outbox pub(crate) outbox: Url, diff --git a/crates/apub/src/protocol/objects/mod.rs b/crates/apub/src/protocol/objects/mod.rs index d8b471a6d..a9eb74e0c 100644 --- a/crates/apub/src/protocol/objects/mod.rs +++ b/crates/apub/src/protocol/objects/mod.rs @@ -206,4 +206,13 @@ mod tests { test_json::("assets/nodebb/objects/person.json")?; Ok(()) } + + #[test] + fn test_parse_object_wordpress() -> LemmyResult<()> { + test_json::("assets/wordpress/objects/group.json")?; + test_json::("assets/wordpress/objects/page.json")?; + test_json::("assets/wordpress/objects/person.json")?; + test_json::("assets/wordpress/objects/note.json")?; + Ok(()) + } } diff --git a/crates/apub/src/protocol/objects/page.rs b/crates/apub/src/protocol/objects/page.rs index 4d70744cf..bbb46bfaf 100644 --- a/crates/apub/src/protocol/objects/page.rs +++ b/crates/apub/src/protocol/objects/page.rs @@ -233,6 +233,10 @@ impl ActivityHandler for Page { #[async_trait::async_trait] impl InCommunity for Page { async fn community(&self, context: &Data) -> LemmyResult { + if let Some(audience) = &self.audience { + return audience.dereference(context).await; + } + let community = match &self.attributed_to { AttributedTo::Lemmy(_) => { let mut iter = self.to.iter().merge(self.cc.iter()); @@ -243,7 +247,7 @@ impl InCommunity for Page { break c; } } else { - Err(LemmyErrorType::NoCommunityFoundInCc)? + Err(LemmyErrorType::CouldntFindCommunity)?; } } } @@ -251,11 +255,12 @@ impl InCommunity for Page { p.iter() .find(|a| a.kind == PersonOrGroupType::Group) .map(|a| ObjectId::::from(a.id.clone().into_inner())) - .ok_or(LemmyErrorType::PageDoesNotSpecifyGroup)? + .ok_or(LemmyErrorType::CouldntFindCommunity)? .dereference(context) .await? } }; + if let Some(audience) = &self.audience { verify_community_matches(audience, community.actor_id.clone())?; } diff --git a/crates/db_schema/replaceable_schema/triggers.sql b/crates/db_schema/replaceable_schema/triggers.sql index d869a5e1e..fa5b01018 100644 --- a/crates/db_schema/replaceable_schema/triggers.sql +++ b/crates/db_schema/replaceable_schema/triggers.sql @@ -5,6 +5,12 @@ -- (even if only other columns are updated) because triggers can run after the deletion of referenced rows and -- before the automatic deletion of the row that references it. This is not a problem for insert or delete. -- +-- After a row update begins, a concurrent update on the same row can't begin until the whole +-- transaction that contains the first update is finished. To reduce this locking, statements in +-- triggers should be ordered based on the likelihood of concurrent writers. For example, updating +-- site_aggregates should be done last because the same row is updated for all local stuff. If +-- it were not last, then the locking period for concurrent writers would extend to include the +-- time consumed by statements that come after. -- -- -- Create triggers for both post and comments @@ -38,16 +44,18 @@ BEGIN (thing_like).thing_id, coalesce(sum(count_diff) FILTER (WHERE (thing_like).score = 1), 0) AS upvotes, coalesce(sum(count_diff) FILTER (WHERE (thing_like).score != 1), 0) AS downvotes FROM select_old_and_new_rows AS old_and_new_rows GROUP BY (thing_like).thing_id) AS diff WHERE a.thing_id = diff.thing_id - RETURNING - r.creator_id_from_thing_aggregates (a.*) AS creator_id, diff.upvotes - diff.downvotes AS score) - UPDATE - person_aggregates AS a - SET - thing_score = a.thing_score + diff.score FROM ( - SELECT - creator_id, sum(score) AS score FROM thing_diff GROUP BY creator_id) AS diff - WHERE - a.person_id = diff.creator_id; + AND (diff.upvotes, diff.downvotes) != (0, 0) + RETURNING + r.creator_id_from_thing_aggregates (a.*) AS creator_id, diff.upvotes - diff.downvotes AS score) + UPDATE + person_aggregates AS a + SET + thing_score = a.thing_score + diff.score FROM ( + SELECT + creator_id, sum(score) AS score FROM thing_diff GROUP BY creator_id) AS diff + WHERE + a.person_id = diff.creator_id + AND diff.score != 0; RETURN NULL; END; $$); @@ -62,6 +70,21 @@ CALL r.post_or_comment ('post'); CALL r.post_or_comment ('comment'); -- Create triggers that update counts in parent aggregates +CREATE FUNCTION r.parent_comment_ids (path ltree) + RETURNS SETOF int + LANGUAGE sql + IMMUTABLE parallel safe +BEGIN + ATOMIC + SELECT + comment_id::int + FROM + string_to_table (ltree2text (path), '.') AS comment_id + -- Skip first and last +LIMIT (nlevel (path) - 2) OFFSET 1; + +END; + CALL r.create_triggers ('comment', $$ BEGIN UPDATE @@ -76,60 +99,84 @@ BEGIN r.is_counted (comment) GROUP BY (comment).creator_id) AS diff WHERE - a.person_id = diff.creator_id; + a.person_id = diff.creator_id + AND diff.comment_count != 0; UPDATE - site_aggregates AS a + comment_aggregates AS a SET - comments = a.comments + diff.comments + child_count = a.child_count + diff.child_count FROM ( SELECT - coalesce(sum(count_diff), 0) AS comments - FROM - select_old_and_new_rows AS old_and_new_rows - WHERE - r.is_counted (comment) - AND (comment).local) AS diff; + parent_id, + coalesce(sum(count_diff), 0) AS child_count + FROM ( + -- For each inserted or deleted comment, this outputs 1 row for each parent comment. + -- For example, this: + -- + -- count_diff | (comment).path + -- ------------+---------------- + -- 1 | 0.5.6.7 + -- 1 | 0.5.6.7.8 + -- + -- becomes this: + -- + -- count_diff | parent_id + -- ------------+----------- + -- 1 | 5 + -- 1 | 6 + -- 1 | 5 + -- 1 | 6 + -- 1 | 7 + SELECT + count_diff, + parent_id + FROM + select_old_and_new_rows AS old_and_new_rows, + LATERAL r.parent_comment_ids ((comment).path) AS parent_id) AS expanded_old_and_new_rows + GROUP BY + parent_id) AS diff +WHERE + a.comment_id = diff.parent_id + AND diff.child_count != 0; WITH post_diff AS ( UPDATE post_aggregates AS a SET comments = a.comments + diff.comments, - newest_comment_time = GREATEST (a.newest_comment_time, ( - SELECT - published - FROM select_new_rows AS new_comment - WHERE - a.post_id = new_comment.post_id ORDER BY published DESC LIMIT 1)), - newest_comment_time_necro = GREATEST (a.newest_comment_time_necro, ( - SELECT - published - FROM select_new_rows AS new_comment - WHERE - a.post_id = new_comment.post_id - -- Ignore comments from the post's creator - AND a.creator_id != new_comment.creator_id - -- Ignore comments on old posts - AND a.published > (new_comment.published - '2 days'::interval) - ORDER BY published DESC LIMIT 1)) + newest_comment_time = GREATEST (a.newest_comment_time, diff.newest_comment_time), + newest_comment_time_necro = GREATEST (a.newest_comment_time_necro, diff.newest_comment_time_necro) FROM ( SELECT - (comment).post_id, - coalesce(sum(count_diff), 0) AS comments + post.id AS post_id, + coalesce(sum(count_diff), 0) AS comments, + -- Old rows are excluded using `count_diff = 1` + max((comment).published) FILTER (WHERE count_diff = 1) AS newest_comment_time, + max((comment).published) FILTER (WHERE count_diff = 1 + -- Ignore comments from the post's creator + AND post.creator_id != (comment).creator_id + -- Ignore comments on old posts + AND post.published > ((comment).published - '2 days'::interval)) AS newest_comment_time_necro, + r.is_counted (post.*) AS include_in_community_aggregates FROM select_old_and_new_rows AS old_and_new_rows + LEFT JOIN post ON post.id = (comment).post_id WHERE r.is_counted (comment) GROUP BY - (comment).post_id) AS diff - LEFT JOIN post ON post.id = diff.post_id + post.id) AS diff WHERE a.post_id = diff.post_id + AND (diff.comments, + GREATEST (a.newest_comment_time, diff.newest_comment_time), + GREATEST (a.newest_comment_time_necro, diff.newest_comment_time_necro)) != (0, + a.newest_comment_time, + a.newest_comment_time_necro) RETURNING a.community_id, diff.comments, - r.is_counted (post.*) AS include_in_community_aggregates) + diff.include_in_community_aggregates) UPDATE community_aggregates AS a SET @@ -145,7 +192,23 @@ FROM ( GROUP BY community_id) AS diff WHERE - a.community_id = diff.community_id; + a.community_id = diff.community_id + AND diff.comments != 0; + +UPDATE + site_aggregates AS a +SET + comments = a.comments + diff.comments +FROM ( + SELECT + coalesce(sum(count_diff), 0) AS comments + FROM + select_old_and_new_rows AS old_and_new_rows + WHERE + r.is_counted (comment) + AND (comment).local) AS diff +WHERE + diff.comments != 0; RETURN NULL; @@ -167,20 +230,8 @@ BEGIN r.is_counted (post) GROUP BY (post).creator_id) AS diff WHERE - a.person_id = diff.creator_id; - -UPDATE - site_aggregates AS a -SET - posts = a.posts + diff.posts -FROM ( - SELECT - coalesce(sum(count_diff), 0) AS posts - FROM - select_old_and_new_rows AS old_and_new_rows - WHERE - r.is_counted (post) - AND (post).local) AS diff; + a.person_id = diff.creator_id + AND diff.post_count != 0; UPDATE community_aggregates AS a @@ -197,7 +248,23 @@ FROM ( GROUP BY (post).community_id) AS diff WHERE - a.community_id = diff.community_id; + a.community_id = diff.community_id + AND diff.posts != 0; + +UPDATE + site_aggregates AS a +SET + posts = a.posts + diff.posts +FROM ( + SELECT + coalesce(sum(count_diff), 0) AS posts + FROM + select_old_and_new_rows AS old_and_new_rows + WHERE + r.is_counted (post) + AND (post).local) AS diff +WHERE + diff.posts != 0; RETURN NULL; @@ -217,7 +284,9 @@ BEGIN FROM select_old_and_new_rows AS old_and_new_rows WHERE r.is_counted (community) - AND (community).local) AS diff; + AND (community).local) AS diff +WHERE + diff.communities != 0; RETURN NULL; @@ -235,7 +304,9 @@ BEGIN SELECT coalesce(sum(count_diff), 0) AS users FROM select_old_and_new_rows AS old_and_new_rows - WHERE (person).local) AS diff; + WHERE (person).local) AS diff +WHERE + diff.users != 0; RETURN NULL; @@ -270,7 +341,8 @@ BEGIN GROUP BY old_post.community_id) AS diff WHERE - a.community_id = diff.community_id; + a.community_id = diff.community_id + AND diff.comments != 0; RETURN NULL; END; $$; @@ -296,7 +368,8 @@ BEGIN LEFT JOIN community ON community.id = (community_follower).community_id LEFT JOIN person ON person.id = (community_follower).person_id GROUP BY (community_follower).community_id) AS diff WHERE - a.community_id = diff.community_id; + a.community_id = diff.community_id + AND (diff.subscribers, diff.subscribers_local) != (0, 0); RETURN NULL; @@ -474,3 +547,24 @@ CREATE TRIGGER delete_follow FOR EACH ROW EXECUTE FUNCTION r.delete_follow_before_person (); +-- Triggers that change values before insert or update +CREATE FUNCTION r.comment_change_values () + RETURNS TRIGGER + LANGUAGE plpgsql + AS $$ +DECLARE + id text = NEW.id::text; +BEGIN + -- Make `path` end with `id` if it doesn't already + IF NOT (NEW.path ~ ('*.' || id)::lquery) THEN + NEW.path = NEW.path || id; + END IF; + RETURN NEW; +END +$$; + +CREATE TRIGGER change_values + BEFORE INSERT OR UPDATE ON comment + FOR EACH ROW + EXECUTE FUNCTION r.comment_change_values (); + diff --git a/crates/db_schema/src/impls/comment.rs b/crates/db_schema/src/impls/comment.rs index 30c058b89..eff7da26f 100644 --- a/crates/db_schema/src/impls/comment.rs +++ b/crates/db_schema/src/impls/comment.rs @@ -15,12 +15,7 @@ use crate::{ utils::{functions::coalesce, get_conn, naive_now, DbPool, DELETED_REPLACEMENT_TEXT}, }; use chrono::{DateTime, Utc}; -use diesel::{ - dsl::{insert_into, sql_query}, - result::Error, - ExpressionMethods, - QueryDsl, -}; +use diesel::{dsl::insert_into, result::Error, ExpressionMethods, QueryDsl}; use diesel_async::RunQueryDsl; use diesel_ltree::Ltree; use url::Url; @@ -72,81 +67,23 @@ impl Comment { parent_path: Option<&Ltree>, ) -> Result { let conn = &mut get_conn(pool).await?; + let comment_form = (comment_form, parent_path.map(|p| comment::path.eq(p))); - conn - .build_transaction() - .run(|conn| { - Box::pin(async move { - // Insert, to get the id - let inserted_comment = if let Some(timestamp) = timestamp { - insert_into(comment::table) - .values(comment_form) - .on_conflict(comment::ap_id) - .filter_target(coalesce(comment::updated, comment::published).lt(timestamp)) - .do_update() - .set(comment_form) - .get_result::(conn) - .await? - } else { - insert_into(comment::table) - .values(comment_form) - .get_result::(conn) - .await? - }; - - let comment_id = inserted_comment.id; - - // You need to update the ltree column - let ltree = Ltree(if let Some(parent_path) = parent_path { - // The previous parent will already have 0 in it - // Append this comment id - format!("{}.{}", parent_path.0, comment_id) - } else { - // '0' is always the first path, append to that - format!("{}.{}", 0, comment_id) - }); - - let updated_comment = diesel::update(comment::table.find(comment_id)) - .set(comment::path.eq(ltree)) - .get_result::(conn) - .await?; - - // Update the child count for the parent comment_aggregates - // You could do this with a trigger, but since you have to do this manually anyway, - // you can just have it here - if let Some(parent_path) = parent_path { - // You have to update counts for all parents, not just the immediate one - // TODO if the performance of this is terrible, it might be better to do this as part of a - // scheduled query... although the counts would often be wrong. - // - // The child_count query for reference: - // select c.id, c.path, count(c2.id) as child_count from comment c - // left join comment c2 on c2.path <@ c.path and c2.path != c.path - // group by c.id - - let parent_id = parent_path.0.split('.').nth(1); - - if let Some(parent_id) = parent_id { - let top_parent = format!("0.{}", parent_id); - let update_child_count_stmt = format!( - " -update comment_aggregates ca set child_count = c.child_count -from ( - select c.id, c.path, count(c2.id) as child_count from comment c - join comment c2 on c2.path <@ c.path and c2.path != c.path - and c.path <@ '{top_parent}' - group by c.id -) as c -where ca.comment_id = c.id" - ); - - sql_query(update_child_count_stmt).execute(conn).await?; - } - } - Ok(updated_comment) - }) as _ - }) - .await + if let Some(timestamp) = timestamp { + insert_into(comment::table) + .values(comment_form) + .on_conflict(comment::ap_id) + .filter_target(coalesce(comment::updated, comment::published).lt(timestamp)) + .do_update() + .set(comment_form) + .get_result::(conn) + .await + } else { + insert_into(comment::table) + .values(comment_form) + .get_result::(conn) + .await + } } pub async fn read_from_apub_id( diff --git a/crates/db_schema/src/impls/local_user.rs b/crates/db_schema/src/impls/local_user.rs index d253afd8d..62fc418d0 100644 --- a/crates/db_schema/src/impls/local_user.rs +++ b/crates/db_schema/src/impls/local_user.rs @@ -55,12 +55,17 @@ impl LocalUser { pool: &mut DbPool<'_>, local_user_id: LocalUserId, form: &LocalUserUpdateForm, - ) -> Result { + ) -> Result { let conn = &mut get_conn(pool).await?; - diesel::update(local_user::table.find(local_user_id)) + let res = diesel::update(local_user::table.find(local_user_id)) .set(form) - .get_result::(conn) - .await + .execute(conn) + .await; + // Diesel will throw an error if the query is all Nones (not updating anything), ignore this. + match res { + Err(Error::QueryBuilderError(_)) => Ok(0), + other => other, + } } pub async fn delete(pool: &mut DbPool<'_>, id: LocalUserId) -> Result { diff --git a/crates/db_views/src/post_view.rs b/crates/db_views/src/post_view.rs index 9f3a29411..2578dc698 100644 --- a/crates/db_views/src/post_view.rs +++ b/crates/db_views/src/post_view.rs @@ -950,9 +950,8 @@ mod tests { show_bot_accounts: Some(false), ..Default::default() }; - let inserted_local_user = - LocalUser::update(pool, data.local_user_view.local_user.id, &local_user_form).await?; - data.local_user_view.local_user = inserted_local_user; + LocalUser::update(pool, data.local_user_view.local_user.id, &local_user_form).await?; + data.local_user_view.local_user.show_bot_accounts = false; let read_post_listing = PostQuery { community_id: Some(data.inserted_community.id), @@ -986,9 +985,8 @@ mod tests { show_bot_accounts: Some(true), ..Default::default() }; - let inserted_local_user = - LocalUser::update(pool, data.local_user_view.local_user.id, &local_user_form).await?; - data.local_user_view.local_user = inserted_local_user; + LocalUser::update(pool, data.local_user_view.local_user.id, &local_user_form).await?; + data.local_user_view.local_user.show_bot_accounts = true; let post_listings_with_bots = PostQuery { community_id: Some(data.inserted_community.id), @@ -1110,9 +1108,8 @@ mod tests { show_bot_accounts: Some(false), ..Default::default() }; - let inserted_local_user = - LocalUser::update(pool, data.local_user_view.local_user.id, &local_user_form).await?; - data.local_user_view.local_user = inserted_local_user; + LocalUser::update(pool, data.local_user_view.local_user.id, &local_user_form).await?; + data.local_user_view.local_user.show_bot_accounts = false; let read_post_listing = PostQuery { community_id: Some(data.inserted_community.id), @@ -1533,9 +1530,8 @@ mod tests { show_read_posts: Some(false), ..Default::default() }; - let inserted_local_user = - LocalUser::update(pool, data.local_user_view.local_user.id, &local_user_form).await?; - data.local_user_view.local_user = inserted_local_user; + LocalUser::update(pool, data.local_user_view.local_user.id, &local_user_form).await?; + data.local_user_view.local_user.show_read_posts = false; // Mark a post as read PostRead::mark_as_read( diff --git a/crates/routes/src/nodeinfo.rs b/crates/routes/src/nodeinfo.rs index dbb2ef68a..665756864 100644 --- a/crates/routes/src/nodeinfo.rs +++ b/crates/routes/src/nodeinfo.rs @@ -43,21 +43,18 @@ async fn node_info(context: web::Data) -> Result) -> Result>, pub usage: Option, pub open_registrations: Option, + /// These fields are required by the spec for no reason + pub services: Option, + pub metadata: Option>, } #[derive(Serialize, Deserialize, Debug, Default)] @@ -99,6 +105,8 @@ pub struct NodeInfo { pub struct NodeInfoSoftware { pub name: Option, pub version: Option, + pub repository: Option, + pub homepage: Option, } #[derive(Serialize, Deserialize, Debug, Default)] @@ -116,3 +124,10 @@ pub struct NodeInfoUsers { pub active_halfyear: Option, pub active_month: Option, } + +#[derive(Serialize, Deserialize, Debug, Default)] +#[serde(rename_all = "camelCase", default)] +pub struct NodeInfoServices { + pub inbound: Option>, + pub outbound: Option>, +} diff --git a/crates/utils/src/error.rs b/crates/utils/src/error.rs index 6cfd0aaed..79d37cd08 100644 --- a/crates/utils/src/error.rs +++ b/crates/utils/src/error.rs @@ -99,8 +99,6 @@ pub enum LemmyErrorType { PersonIsBannedFromSite(String), InvalidVoteValue, PageDoesNotSpecifyCreator, - PageDoesNotSpecifyGroup, - NoCommunityFoundInCc, NoEmailSetup, LocalSiteNotSetup, EmailSmtpServerNeedsAPort, @@ -177,6 +175,7 @@ pub enum LemmyErrorType { InvalidBotAction, CantBlockLocalInstance, UrlWithoutDomain, + InboxTimeout, Unknown(String), } diff --git a/crates/utils/translations b/crates/utils/translations index a4681f70a..f0ab81dee 160000 --- a/crates/utils/translations +++ b/crates/utils/translations @@ -1 +1 @@ -Subproject commit a4681f70a4ddf077951ed2dcc8cf90bb243d4828 +Subproject commit f0ab81deea347c433277a90ae752b10f68473719 diff --git a/migrations/2024-05-04-140749_separate_triggers/down.sql b/migrations/2024-05-04-140749_separate_triggers/down.sql new file mode 100644 index 000000000..deb75def2 --- /dev/null +++ b/migrations/2024-05-04-140749_separate_triggers/down.sql @@ -0,0 +1,3 @@ +SELECT + 1; + diff --git a/migrations/2024-05-04-140749_separate_triggers/up.sql b/migrations/2024-05-04-140749_separate_triggers/up.sql new file mode 100644 index 000000000..2e9d05052 --- /dev/null +++ b/migrations/2024-05-04-140749_separate_triggers/up.sql @@ -0,0 +1,4 @@ +-- This migration exists to trigger re-execution of replaceable_schema +SELECT + 1; + diff --git a/scripts/postgres_15_to_16_upgrade.sh b/scripts/postgres_15_to_16_upgrade.sh index 20a6c594c..f2ac0d5d6 100755 --- a/scripts/postgres_15_to_16_upgrade.sh +++ b/scripts/postgres_15_to_16_upgrade.sh @@ -4,39 +4,39 @@ set -e echo "Do not stop in the middle of this upgrade, wait until you see the message: Upgrade complete." echo "Stopping lemmy and all services..." -sudo docker-compose stop +sudo docker compose stop echo "Make sure postgres is started..." -sudo docker-compose up -d postgres +sudo docker compose up -d postgres echo "Waiting..." sleep 20s echo "Exporting the Database to 15_16.dump.sql ..." -sudo docker-compose exec -T postgres pg_dumpall -c -U lemmy > 15_16_dump.sql +sudo docker compose exec -T postgres pg_dumpall -c -U lemmy | sudo tee 15_16_dump.sql > /dev/null echo "Done." echo "Stopping postgres..." -sudo docker-compose stop postgres +sudo docker compose stop postgres echo "Waiting..." sleep 20s echo "Removing the old postgres folder" sudo rm -rf volumes/postgres -echo "Updating docker-compose to use postgres version 16." -sed -i "s/image: postgres:.*/image: postgres:16-alpine/" ./docker-compose.yml +echo "Updating docker compose to use postgres version 16." +sudo sed -i "s/image: .*postgres:.*/image: docker.io/postgres:16-alpine/" ./docker-compose.yml echo "Starting up new postgres..." -sudo docker-compose up -d postgres +sudo docker compose up -d postgres echo "Waiting..." sleep 20s echo "Importing the database...." -cat 15_16_dump.sql | sudo docker-compose exec -T postgres psql -U lemmy +sudo cat 15_16_dump.sql | sudo docker compose exec -T postgres psql -U lemmy echo "Done." echo "Starting up lemmy..." -sudo docker-compose up -d +sudo docker compose up -d echo "A copy of your old database is at 15_16.dump.sql . You can delete this file if the upgrade went smoothly." echo "Upgrade complete." diff --git a/src/api_routes_http.rs b/src/api_routes_http.rs index 013e2e092..6bfe0d727 100644 --- a/src/api_routes_http.rs +++ b/src/api_routes_http.rs @@ -262,12 +262,22 @@ pub fn config(cfg: &mut web::ServiceConfig, rate_limit: &RateLimitCell) { // User .service( // Account action, I don't like that it's in /user maybe /accounts - // Handle /user/register separately to add the register() rate limitter + // Handle /user/register separately to add the register() rate limiter web::resource("/user/register") .guard(guard::Post()) .wrap(rate_limit.register()) .route(web::post().to(register)), ) + // User + .service( + // Handle /user/login separately to add the register() rate limiter + // TODO: pretty annoying way to apply rate limits for register and login, we should + // group them under a common path so that rate limit is only applied once (eg under /account). + web::resource("/user/login") + .guard(guard::Post()) + .wrap(rate_limit.register()) + .route(web::post().to(login)), + ) .service( // Handle captcha separately web::resource("/user/get_captcha") @@ -306,7 +316,6 @@ pub fn config(cfg: &mut web::ServiceConfig, rate_limit: &RateLimitCell) { .route("/banned", web::get().to(list_banned_users)) .route("/block", web::post().to(block_person)) // TODO Account actions. I don't like that they're in /user maybe /accounts - .route("/login", web::post().to(login)) .route("/logout", web::post().to(logout)) .route("/delete_account", web::post().to(delete_account)) .route("/password_reset", web::post().to(reset_password)) diff --git a/src/lib.rs b/src/lib.rs index 633fd5313..61e8abd13 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -160,10 +160,10 @@ pub async fn start_lemmy_server(args: CmdArgs) -> LemmyResult<()> { rate_limit_cell.clone(), ); - if !args.disable_scheduled_tasks { + let scheduled_tasks = (!args.disable_scheduled_tasks).then(|| { // Schedules various cleanup tasks for the DB - let _scheduled_tasks = tokio::task::spawn(scheduled_tasks::setup(context.clone())); - } + tokio::task::spawn(scheduled_tasks::setup(context.clone())) + }); if let Some(prometheus) = SETTINGS.prometheus.clone() { serve_prometheus(prometheus, context.clone())?; @@ -218,7 +218,7 @@ pub async fn start_lemmy_server(args: CmdArgs) -> LemmyResult<()> { let mut interrupt = tokio::signal::unix::signal(SignalKind::interrupt())?; let mut terminate = tokio::signal::unix::signal(SignalKind::terminate())?; - if server.is_some() || federate.is_some() { + if server.is_some() || federate.is_some() || scheduled_tasks.is_some() { tokio::select! { _ = tokio::signal::ctrl_c() => { tracing::warn!("Received ctrl-c, shutting down gracefully...");