From 6e0abfe34c38d84302e416ab75ded9b3a20c2ac6 Mon Sep 17 00:00:00 2001 From: KMY Date: Wed, 13 Sep 2023 23:01:30 +0900 Subject: [PATCH 01/15] Fix status emoji_reaction is removed when reblog --- app/lib/status_cache_hydrator.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/lib/status_cache_hydrator.rb b/app/lib/status_cache_hydrator.rb index f6448b15ac..e4a00fa768 100644 --- a/app/lib/status_cache_hydrator.rb +++ b/app/lib/status_cache_hydrator.rb @@ -35,7 +35,7 @@ class StatusCacheHydrator payload[:reblog][:bookmarked] = Bookmark.where(account_id: account_id, status_id: @status.reblog_of_id).exists? payload[:reblog][:pinned] = StatusPin.where(account_id: account_id, status_id: @status.reblog_of_id).exists? if @status.reblog.account_id == account_id payload[:reblog][:filtered] = payload[:filtered] - payload[:reblog][:emoji_reactions] = @status.emoji_reactions_grouped_by_name(account) + payload[:reblog][:emoji_reactions] = @status.reblog.emoji_reactions_grouped_by_name(account) if payload[:reblog][:poll] if @status.reblog.account_id == account_id From 1e62ee496520ae7621186c96dd17d1bc39cc1f7a Mon Sep 17 00:00:00 2001 From: KMY Date: Thu, 14 Sep 2023 10:23:28 +0900 Subject: [PATCH 02/15] Change react-beautiful-dnd to @hello-pangea/dnd --- .../mastodon/features/reaction_deck/index.jsx | 2 +- package.json | 2 +- yarn.lock | 568 ++++++++---------- 3 files changed, 260 insertions(+), 312 deletions(-) diff --git a/app/javascript/mastodon/features/reaction_deck/index.jsx b/app/javascript/mastodon/features/reaction_deck/index.jsx index 7492d3cfb7..ebc2985abc 100644 --- a/app/javascript/mastodon/features/reaction_deck/index.jsx +++ b/app/javascript/mastodon/features/reaction_deck/index.jsx @@ -11,7 +11,7 @@ import ImmutablePureComponent from 'react-immutable-pure-component'; import { connect } from 'react-redux'; import { createSelector } from 'reselect'; -import { DragDropContext, Droppable, Draggable } from 'react-beautiful-dnd'; +import { DragDropContext, Droppable, Draggable } from '@hello-pangea/dnd'; import { updateReactionDeck } from 'mastodon/actions/reaction_deck'; import Button from 'mastodon/components/button'; diff --git a/package.json b/package.json index 8f95f09fa4..5de05c53b6 100644 --- a/package.json +++ b/package.json @@ -44,6 +44,7 @@ "@formatjs/intl-pluralrules": "^5.2.2", "@gamestdio/websocket": "^0.3.2", "@github/webauthn-json": "^2.1.1", + "@hello-pangea/dnd": "^16.3.0", "@material-design-icons/svg": "^0.14.10", "@rails/ujs": "^7.0.6", "@reduxjs/toolkit": "^1.9.5", @@ -100,7 +101,6 @@ "prop-types": "^15.8.1", "punycode": "^2.3.0", "react": "^18.2.0", - "react-beautiful-dnd": "^13.1.1", "react-dom": "^18.2.0", "react-helmet": "^6.1.0", "react-hotkeys": "^1.1.4", diff --git a/yarn.lock b/yarn.lock index effc9d9e09..0c5eddba7c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -58,20 +58,20 @@ integrity sha512-5UamI7xkUcJ3i9qVDS+KFDEK8/7oJ55/sJMB1Ge7IEapr7KfdfV/HErR+koZwOfd+SgtFKOKRhRakdg++DcJpQ== "@babel/core@^7.10.4", "@babel/core@^7.11.1", "@babel/core@^7.11.6", "@babel/core@^7.12.3", "@babel/core@^7.22.1": - version "7.22.15" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.22.15.tgz#15d4fd03f478a459015a4b94cfbb3bd42c48d2f4" - integrity sha512-PtZqMmgRrvj8ruoEOIwVA3yoF91O+Hgw9o7DAUTNBA6Mo2jpu31clx9a7Nz/9JznqetTR6zwfC4L3LAjKQXUwA== + version "7.22.17" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.22.17.tgz#2f9b0b395985967203514b24ee50f9fd0639c866" + integrity sha512-2EENLmhpwplDux5PSsZnSbnSkB3tZ6QTksgO25xwEL7pIDcNOMhF5v/s6RzwjMZzZzw9Ofc30gHv5ChCC8pifQ== dependencies: "@ampproject/remapping" "^2.2.0" "@babel/code-frame" "^7.22.13" "@babel/generator" "^7.22.15" "@babel/helper-compilation-targets" "^7.22.15" - "@babel/helper-module-transforms" "^7.22.15" + "@babel/helper-module-transforms" "^7.22.17" "@babel/helpers" "^7.22.15" - "@babel/parser" "^7.22.15" + "@babel/parser" "^7.22.16" "@babel/template" "^7.22.15" - "@babel/traverse" "^7.22.15" - "@babel/types" "^7.22.15" + "@babel/traverse" "^7.22.17" + "@babel/types" "^7.22.17" convert-source-map "^1.7.0" debug "^4.1.0" gensync "^1.0.0-beta.2" @@ -207,7 +207,18 @@ dependencies: "@babel/types" "^7.22.15" -"@babel/helper-module-transforms@^7.22.15", "@babel/helper-module-transforms@^7.22.5", "@babel/helper-module-transforms@^7.22.9": +"@babel/helper-module-transforms@^7.22.15", "@babel/helper-module-transforms@^7.22.17": + version "7.22.17" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.22.17.tgz#7edf129097a51ccc12443adbc6320e90eab76693" + integrity sha512-XouDDhQESrLHTpnBtCKExJdyY4gJCdrvH2Pyv8r8kovX2U8G0dRUOT45T9XlbLtuu9CLXP15eusnkprhoPV5iQ== + dependencies: + "@babel/helper-environment-visitor" "^7.22.5" + "@babel/helper-module-imports" "^7.22.15" + "@babel/helper-simple-access" "^7.22.5" + "@babel/helper-split-export-declaration" "^7.22.6" + "@babel/helper-validator-identifier" "^7.22.15" + +"@babel/helper-module-transforms@^7.22.5", "@babel/helper-module-transforms@^7.22.9": version "7.22.15" resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.22.15.tgz#40ad2f6950f143900e9c1c72363c0b431a606082" integrity sha512-l1UiX4UyHSFsYt17iQ3Se5pQQZZHa22zyIXURmvkmLCD4t/aU+dvNWHatKac/D9Vm9UES7nvIqHs4jZqKviUmQ== @@ -320,7 +331,7 @@ chalk "^2.4.2" js-tokens "^4.0.0" -"@babel/parser@^7.1.0", "@babel/parser@^7.20.7", "@babel/parser@^7.22.15", "@babel/parser@^7.22.5": +"@babel/parser@^7.1.0", "@babel/parser@^7.20.7", "@babel/parser@^7.22.15", "@babel/parser@^7.22.16", "@babel/parser@^7.22.5": version "7.22.16" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.22.16.tgz#180aead7f247305cce6551bea2720934e2fa2c95" integrity sha512-+gPfKv8UWeKKeJTUxe59+OobVcrYHETCsORl61EmSkmgymguYk/X5bp7GuUIXaFsc6y++v8ZxPsLSSuujqDphA== @@ -1087,7 +1098,7 @@ dependencies: regenerator-runtime "^0.12.0" -"@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2", "@babel/runtime@^7.11.2", "@babel/runtime@^7.12.0", "@babel/runtime@^7.12.1", "@babel/runtime@^7.12.5", "@babel/runtime@^7.13.8", "@babel/runtime@^7.15.4", "@babel/runtime@^7.18.3", "@babel/runtime@^7.2.0", "@babel/runtime@^7.20.13", "@babel/runtime@^7.20.7", "@babel/runtime@^7.22.3", "@babel/runtime@^7.3.1", "@babel/runtime@^7.5.5", "@babel/runtime@^7.6.3", "@babel/runtime@^7.8.4", "@babel/runtime@^7.8.7", "@babel/runtime@^7.9.2": +"@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2", "@babel/runtime@^7.11.2", "@babel/runtime@^7.12.0", "@babel/runtime@^7.12.1", "@babel/runtime@^7.12.5", "@babel/runtime@^7.13.8", "@babel/runtime@^7.18.3", "@babel/runtime@^7.2.0", "@babel/runtime@^7.20.13", "@babel/runtime@^7.20.7", "@babel/runtime@^7.22.3", "@babel/runtime@^7.22.5", "@babel/runtime@^7.3.1", "@babel/runtime@^7.5.5", "@babel/runtime@^7.6.3", "@babel/runtime@^7.8.4", "@babel/runtime@^7.8.7", "@babel/runtime@^7.9.2": version "7.22.15" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.22.15.tgz#38f46494ccf6cf020bd4eed7124b425e83e523b8" integrity sha512-T0O+aa+4w0u06iNmapipJXMV4HoUir03hpx3/YqXXhu9xim3w+dVphjFWl1OH8NbZHw5Lbm9k45drDkgq2VNNA== @@ -1112,10 +1123,10 @@ "@babel/parser" "^7.22.5" "@babel/types" "^7.22.5" -"@babel/traverse@7", "@babel/traverse@^7.22.15": - version "7.22.15" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.22.15.tgz#75be4d2d6e216e880e93017f4e2389aeb77ef2d9" - integrity sha512-DdHPwvJY0sEeN4xJU5uRLmZjgMMDIvMPniLuYzUVXj/GGzysPl0/fwt44JBkyUIzGJPV8QgHMcQdQ34XFuKTYQ== +"@babel/traverse@7", "@babel/traverse@^7.22.15", "@babel/traverse@^7.22.17": + version "7.22.17" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.22.17.tgz#b23c203ab3707e3be816043081b4a994fcacec44" + integrity sha512-xK4Uwm0JnAMvxYZxOVecss85WxTEIbTa7bnGyf/+EgCL5Zt3U7htUpEOWv9detPlamGKuRzCqw74xVglDWpPdg== dependencies: "@babel/code-frame" "^7.22.13" "@babel/generator" "^7.22.15" @@ -1123,15 +1134,15 @@ "@babel/helper-function-name" "^7.22.5" "@babel/helper-hoist-variables" "^7.22.5" "@babel/helper-split-export-declaration" "^7.22.6" - "@babel/parser" "^7.22.15" - "@babel/types" "^7.22.15" + "@babel/parser" "^7.22.16" + "@babel/types" "^7.22.17" debug "^4.1.0" globals "^11.1.0" -"@babel/types@^7.0.0", "@babel/types@^7.12.11", "@babel/types@^7.20.7", "@babel/types@^7.22.10", "@babel/types@^7.22.15", "@babel/types@^7.22.5", "@babel/types@^7.4.4": - version "7.22.15" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.22.15.tgz#266cb21d2c5fd0b3931e7a91b6dd72d2f617d282" - integrity sha512-X+NLXr0N8XXmN5ZsaQdm9U2SSC3UbIYq/doL++sueHOTisgZHoKaQtZxGuV2cUPQHMfjKEfg/g6oy7Hm6SKFtA== +"@babel/types@^7.0.0", "@babel/types@^7.12.11", "@babel/types@^7.20.7", "@babel/types@^7.22.15", "@babel/types@^7.22.17", "@babel/types@^7.22.5": + version "7.22.17" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.22.17.tgz#f753352c4610ffddf9c8bc6823f9ff03e2303eee" + integrity sha512-YSQPHLFtQNE5xN9tHuZnzu8vPr61wVTBZdfv1meex1NBosa4iT05k/Jw06ddJugi4bk7The/oSwQGFcksmEJQg== dependencies: "@babel/helper-string-parser" "^7.22.5" "@babel/helper-validator-identifier" "^7.22.15" @@ -1146,6 +1157,15 @@ "@babel/helper-validator-identifier" "^7.22.5" to-fast-properties "^2.0.0" +"@babel/types@^7.22.10", "@babel/types@^7.4.4": + version "7.22.15" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.22.15.tgz#266cb21d2c5fd0b3931e7a91b6dd72d2f617d282" + integrity sha512-X+NLXr0N8XXmN5ZsaQdm9U2SSC3UbIYq/doL++sueHOTisgZHoKaQtZxGuV2cUPQHMfjKEfg/g6oy7Hm6SKFtA== + dependencies: + "@babel/helper-string-parser" "^7.22.5" + "@babel/helper-validator-identifier" "^7.22.15" + to-fast-properties "^2.0.0" + "@babel/types@^7.3.3": version "7.22.10" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.22.10.tgz#4a9e76446048f2c66982d1a989dd12b8a2d2dc03" @@ -1309,10 +1329,10 @@ minimatch "^3.1.2" strip-json-comments "^3.1.1" -"@eslint/js@8.48.0": - version "8.48.0" - resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.48.0.tgz#642633964e217905436033a2bd08bf322849b7fb" - integrity sha512-ZSjtmelB7IJfWD2Fvb7+Z+ChTIKWq6kjda95fLcQKNS5aheVHn4IkfgRQE3sIIzTcSLwLcLZUD9UBt+V7+h+Pw== +"@eslint/js@8.49.0": + version "8.49.0" + resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.49.0.tgz#86f79756004a97fa4df866835093f1df3d03c333" + integrity sha512-1S8uAY/MTJqVx0SC4epBq+N2yhuwtNwLbJYNZyhL2pO1ZVKn5HFXav5T41Ryzy9K9V7ZId2JB2oy/W4aCd9/2w== "@floating-ui/core@^1.3.1": version "1.3.1" @@ -1331,20 +1351,12 @@ resolved "https://registry.yarnpkg.com/@formatjs/cli/-/cli-6.1.3.tgz#b4b95259398e222ec6c06cf5f23f76d987f53e96" integrity sha512-PdTXZTY8LqxwmvFqdifn89gjXnPUpGtGyFs0BnoeLuOuxZFSnBfIs5WQCVMaJnr1+0vNNlXyT0VAIAwjRpf6BA== -"@formatjs/ecma402-abstract@1.17.0": - version "1.17.0" - resolved "https://registry.yarnpkg.com/@formatjs/ecma402-abstract/-/ecma402-abstract-1.17.0.tgz#2ce191a3bde4c65c6684e03fa247062a4a294b9e" - integrity sha512-6ueQTeJZtwKjmh23bdkq/DMqH4l4bmfvtQH98blOSbiXv/OUiyijSW6jU22IT8BNM1ujCaEvJfTtyCYVH38EMQ== +"@formatjs/ecma402-abstract@1.17.2": + version "1.17.2" + resolved "https://registry.yarnpkg.com/@formatjs/ecma402-abstract/-/ecma402-abstract-1.17.2.tgz#d197c6e26b9fd96ff7ba3b3a0cc2f25f1f2dcac3" + integrity sha512-k2mTh0m+IV1HRdU0xXM617tSQTi53tVR2muvYOsBeYcUgEAyxV1FOC7Qj279th3fBVQ+Dj6muvNJZcHSPNdbKg== dependencies: - "@formatjs/intl-localematcher" "0.4.0" - tslib "^2.4.0" - -"@formatjs/ecma402-abstract@1.17.1": - version "1.17.1" - resolved "https://registry.yarnpkg.com/@formatjs/ecma402-abstract/-/ecma402-abstract-1.17.1.tgz#6ac7d6a1d1c9c8eff76ab6ed949f2a5cbe424030" - integrity sha512-N2sjSUrmsEoynG8Q61pkrKlJ9PxcUGxJke1x3301aGyprGgl58wHWhgGUnzTfS4OHNNNQDxzjcXVp1t5fGW6yQ== - dependencies: - "@formatjs/intl-localematcher" "0.4.1" + "@formatjs/intl-localematcher" "0.4.2" tslib "^2.4.0" "@formatjs/fast-memoize@2.2.0": @@ -1354,113 +1366,76 @@ dependencies: tslib "^2.4.0" -"@formatjs/icu-messageformat-parser@2.6.0": - version "2.6.0" - resolved "https://registry.yarnpkg.com/@formatjs/icu-messageformat-parser/-/icu-messageformat-parser-2.6.0.tgz#b0d58ce8c8f472969c96b5cd0b3ad5522d3a02b7" - integrity sha512-yT6at0qc0DANw9qM/TU8RZaCtfDXtj4pZM/IC2WnVU80yAcliS3KVDiuUt4jSQAeFL9JS5bc2hARnFmjPdA6qw== +"@formatjs/icu-messageformat-parser@2.6.2": + version "2.6.2" + resolved "https://registry.yarnpkg.com/@formatjs/icu-messageformat-parser/-/icu-messageformat-parser-2.6.2.tgz#9bbb29099416e4ce2c7df50029c48985d4f901b3" + integrity sha512-nF/Iww7sc5h+1MBCDRm68qpHTCG4xvGzYs/x9HFcDETSGScaJ1Fcadk5U/NXjXeCtzD+DhN4BAwKFVclHfKMdA== dependencies: - "@formatjs/ecma402-abstract" "1.17.0" - "@formatjs/icu-skeleton-parser" "1.6.0" + "@formatjs/ecma402-abstract" "1.17.2" + "@formatjs/icu-skeleton-parser" "1.6.2" tslib "^2.4.0" -"@formatjs/icu-messageformat-parser@2.6.1": - version "2.6.1" - resolved "https://registry.yarnpkg.com/@formatjs/icu-messageformat-parser/-/icu-messageformat-parser-2.6.1.tgz#ca497d5a2bff641dc0978bd9b64d1d02597980cb" - integrity sha512-dTDNupwdovxT1xDXC96zzPUua/XrxTQTOulJZSvaJP0pt3rr/cGR/tq4d7BnxY9oqPZpc4fjWBmrRlhcUyBSiw== +"@formatjs/icu-skeleton-parser@1.6.2": + version "1.6.2" + resolved "https://registry.yarnpkg.com/@formatjs/icu-skeleton-parser/-/icu-skeleton-parser-1.6.2.tgz#00303034dc08583973c8aa67b96534c49c0bad8d" + integrity sha512-VtB9Slo4ZL6QgtDFJ8Injvscf0xiDd4bIV93SOJTBjUF4xe2nAWOoSjLEtqIG+hlIs1sNrVKAaFo3nuTI4r5ZA== dependencies: - "@formatjs/ecma402-abstract" "1.17.1" - "@formatjs/icu-skeleton-parser" "1.6.1" + "@formatjs/ecma402-abstract" "1.17.2" tslib "^2.4.0" -"@formatjs/icu-skeleton-parser@1.6.0": - version "1.6.0" - resolved "https://registry.yarnpkg.com/@formatjs/icu-skeleton-parser/-/icu-skeleton-parser-1.6.0.tgz#0728be8b6b3656f1a4b8e6e5b0e02dffffc23c6c" - integrity sha512-eMmxNpoX/J1IPUjPGSZwo0Wh+7CEvdEMddP2Jxg1gQJXfGfht/FdW2D5XDFj3VMbOTUQlDIdZJY7uC6O6gjPoA== +"@formatjs/intl-displaynames@6.5.2": + version "6.5.2" + resolved "https://registry.yarnpkg.com/@formatjs/intl-displaynames/-/intl-displaynames-6.5.2.tgz#b14ffd0962d5b5cfd71457efc389f0bca83a00db" + integrity sha512-uC2VBlz+WydGTDDpJwMTQuPH3CUpTricr91WH1QMfz5oEHg2sB7mUERcZONE/lu8MOe1jREIx4vBciZEVTqkmA== dependencies: - "@formatjs/ecma402-abstract" "1.17.0" + "@formatjs/ecma402-abstract" "1.17.2" + "@formatjs/intl-localematcher" "0.4.2" tslib "^2.4.0" -"@formatjs/icu-skeleton-parser@1.6.1": - version "1.6.1" - resolved "https://registry.yarnpkg.com/@formatjs/icu-skeleton-parser/-/icu-skeleton-parser-1.6.1.tgz#3647f41b82e362c08bb80bd9b653c7eb6ff31118" - integrity sha512-/LQ6ovxYd8FQjVLmbV+WmuFy86o+JTc0cIQuWixuLuUMfRRif8eUQw3vPK5hx7C/g1UVmKAaOcYRTEsvyEGz9g== +"@formatjs/intl-listformat@7.4.2": + version "7.4.2" + resolved "https://registry.yarnpkg.com/@formatjs/intl-listformat/-/intl-listformat-7.4.2.tgz#c8d86d3b15eead41f74748d1c79d6450fd1bad82" + integrity sha512-+6bSVudEQkf12Hh7kuKt8Xv/MyFlqdwA4V4NLnTZW8uYdF9RxlOELDD0rPaOc2++TMKIzI5o6XXwHPvpL6VrPA== dependencies: - "@formatjs/ecma402-abstract" "1.17.1" + "@formatjs/ecma402-abstract" "1.17.2" + "@formatjs/intl-localematcher" "0.4.2" tslib "^2.4.0" -"@formatjs/intl-displaynames@6.5.1": - version "6.5.1" - resolved "https://registry.yarnpkg.com/@formatjs/intl-displaynames/-/intl-displaynames-6.5.1.tgz#d25d260b81845abf6f35a13dbc87c25b0ec22a33" - integrity sha512-BD+coSUka8fppErGnXbWthd6YxTXdCGvQzGR/rSEdPgiZO5sh+0gVLjp0FgXi6cOf9C2z2axqhGifFsqyTVhkw== - dependencies: - "@formatjs/ecma402-abstract" "1.17.1" - "@formatjs/intl-localematcher" "0.4.1" - tslib "^2.4.0" - -"@formatjs/intl-listformat@7.4.1": - version "7.4.1" - resolved "https://registry.yarnpkg.com/@formatjs/intl-listformat/-/intl-listformat-7.4.1.tgz#cb6f1399a41b9fd568cc4b4b80fc815d0c5b37ab" - integrity sha512-mWd30ndvYw8JydOIVb5Y1ElK2iwsaDY+ajPR5aWWgEZaH04aL+4hzX/8VXPsilu7CF3DN1IP5ZSwJuj7ZyBIHw== - dependencies: - "@formatjs/ecma402-abstract" "1.17.1" - "@formatjs/intl-localematcher" "0.4.1" - tslib "^2.4.0" - -"@formatjs/intl-localematcher@0.4.0": - version "0.4.0" - resolved "https://registry.yarnpkg.com/@formatjs/intl-localematcher/-/intl-localematcher-0.4.0.tgz#63bbc37a7c3545a1bf1686072e51d9a3aed98d6b" - integrity sha512-bRTd+rKomvfdS4QDlVJ6TA/Jx1F2h/TBVO5LjvhQ7QPPHp19oPNMIum7W2CMEReq/zPxpmCeB31F9+5gl/qtvw== - dependencies: - tslib "^2.4.0" - -"@formatjs/intl-localematcher@0.4.1": - version "0.4.1" - resolved "https://registry.yarnpkg.com/@formatjs/intl-localematcher/-/intl-localematcher-0.4.1.tgz#af63e2c065731a33f6fed36dc85058009a7f8062" - integrity sha512-Fs4MhhHlLC0RrspX2u2KP7zlwL9eHrBZsOBxaPOeqrCZYLaOUK4cYXQ1ErpAB0HnGV/GUXNa5smzV/7jCuRzxg== +"@formatjs/intl-localematcher@0.4.2": + version "0.4.2" + resolved "https://registry.yarnpkg.com/@formatjs/intl-localematcher/-/intl-localematcher-0.4.2.tgz#7e6e596dbaf2f0c5a7c22da5a01d5c55f4c37e9a" + integrity sha512-BGdtJFmaNJy5An/Zan4OId/yR9Ih1OojFjcduX/xOvq798OgWSyDtd6Qd5jqJXwJs1ipe4Fxu9+cshic5Ox2tA== dependencies: tslib "^2.4.0" "@formatjs/intl-pluralrules@^5.2.2": - version "5.2.5" - resolved "https://registry.yarnpkg.com/@formatjs/intl-pluralrules/-/intl-pluralrules-5.2.5.tgz#72ff79bec4c3383a46e6b3d6b0af73534e544302" - integrity sha512-od9KJzKB5CF9Hfq3g6CJzWA0rW9yaNrF2hMZK3/26aTuZ4Fm3mPm/JI6QReF9qZSC1qkJyqS1GN0JtTm2sVyGQ== + version "5.2.6" + resolved "https://registry.yarnpkg.com/@formatjs/intl-pluralrules/-/intl-pluralrules-5.2.6.tgz#c08daf9f4feb8a858e8dcb90e50f1e33fd6dc469" + integrity sha512-64i4JvWS1ibw774xnJaNdyIxPzyaO+uGgOtkuS0EbK076f3znEhu1GXh4vmnaCEGb9R3uLwOWU0GjOEbavFzbA== dependencies: - "@formatjs/ecma402-abstract" "1.17.1" - "@formatjs/intl-localematcher" "0.4.1" + "@formatjs/ecma402-abstract" "1.17.2" + "@formatjs/intl-localematcher" "0.4.2" tslib "^2.4.0" -"@formatjs/intl@2.9.1": - version "2.9.1" - resolved "https://registry.yarnpkg.com/@formatjs/intl/-/intl-2.9.1.tgz#f224109620b71f48c049bd42df770f202e4b6d29" - integrity sha512-NsDMke+lAiu+c6/9KXrp8aldd7sFeyxgQZqFUJSZIeaKrN+gEoYKqWgsiRa7/mxlWqWNJSGuNQnF1P2ChC/yaA== +"@formatjs/intl@2.9.2": + version "2.9.2" + resolved "https://registry.yarnpkg.com/@formatjs/intl/-/intl-2.9.2.tgz#83fbd8fccb1088aee084508fd5a387d30c2f83e4" + integrity sha512-brettBil92sd8i4dHEc6by8mqp4NbRvR2A94dZK9pQuSghkoqn2TIvwuaetmMNsBXexv7hYsehNQPi1qqkdPig== dependencies: - "@formatjs/ecma402-abstract" "1.17.1" + "@formatjs/ecma402-abstract" "1.17.2" "@formatjs/fast-memoize" "2.2.0" - "@formatjs/icu-messageformat-parser" "2.6.1" - "@formatjs/intl-displaynames" "6.5.1" - "@formatjs/intl-listformat" "7.4.1" - intl-messageformat "10.5.1" + "@formatjs/icu-messageformat-parser" "2.6.2" + "@formatjs/intl-displaynames" "6.5.2" + "@formatjs/intl-listformat" "7.4.2" + intl-messageformat "10.5.2" tslib "^2.4.0" -"@formatjs/ts-transformer@3.13.3": - version "3.13.3" - resolved "https://registry.yarnpkg.com/@formatjs/ts-transformer/-/ts-transformer-3.13.3.tgz#249f5b5df70c51e651280732536d5504078297ff" - integrity sha512-W6+huH4dLYx8eZfZue6fcreNzLZHoPboreqJSkickYCKIOicI35zC0Txb4xCT6kau/DXAKTpNEln3V2NgX6Igg== +"@formatjs/ts-transformer@3.13.5": + version "3.13.5" + resolved "https://registry.yarnpkg.com/@formatjs/ts-transformer/-/ts-transformer-3.13.5.tgz#8b4f5dcb02940e3f12b9f6c95b47f52777a9969d" + integrity sha512-dh2mmZqkId0UeM+FQtmwugpMGvyzTBmXj5LjwD4M5OeSm62tcgkScjqeO/1EetaNS/JkTUBbsFBnHzaDzh3yOw== dependencies: - "@formatjs/icu-messageformat-parser" "2.6.0" - "@types/json-stable-stringify" "^1.0.32" - "@types/node" "14 || 16 || 17" - chalk "^4.0.0" - json-stable-stringify "^1.0.1" - tslib "^2.4.0" - typescript "^4.7 || 5" - -"@formatjs/ts-transformer@3.13.4": - version "3.13.4" - resolved "https://registry.yarnpkg.com/@formatjs/ts-transformer/-/ts-transformer-3.13.4.tgz#586582ab3aee75b7e24d37f7090ab270062a9bf5" - integrity sha512-AOOHpHBJyjcNLkJcT82zeU7IlaogHI4qBjPlFgyeqcSbGwR4b+LGY7Frf7N5eM8Y9yGnTDVIUA/u3gHUA3SHQg== - dependencies: - "@formatjs/icu-messageformat-parser" "2.6.1" + "@formatjs/icu-messageformat-parser" "2.6.2" "@types/json-stable-stringify" "^1.0.32" "@types/node" "14 || 16 || 17" chalk "^4.0.0" @@ -1483,10 +1458,23 @@ resolved "https://registry.yarnpkg.com/@github/webauthn-json/-/webauthn-json-2.1.1.tgz#648e63fc28050917d2882cc2b27817a88cb420fc" integrity sha512-XrftRn4z75SnaJOmZQbt7Mk+IIjqVHw+glDGOxuHwXkZBZh/MBoRS7MHjSZMDaLhT4RjN2VqiEU7EOYleuJWSQ== -"@humanwhocodes/config-array@^0.11.10": - version "0.11.10" - resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.10.tgz#5a3ffe32cc9306365fb3fd572596cd602d5e12d2" - integrity sha512-KVVjQmNUepDVGXNuoRRdmmEjruj0KfiGSbS8LVc12LMsWDQzRXJ0qdhN8L8uUigKpfEHRhlaQFY0ib1tnUbNeQ== +"@hello-pangea/dnd@^16.3.0": + version "16.3.0" + resolved "https://registry.yarnpkg.com/@hello-pangea/dnd/-/dnd-16.3.0.tgz#3776212f812df4e8e69c42831ec8ab7ff3a087d6" + integrity sha512-RYQ/K8shtJoyNPvFWz0gfXIK7HF3P3mL9UZFGMuHB0ljRSXVgMjVFI/FxcZmakMzw6tO7NflWLriwTNBow/4vw== + dependencies: + "@babel/runtime" "^7.22.5" + css-box-model "^1.2.1" + memoize-one "^6.0.0" + raf-schd "^4.0.3" + react-redux "^8.1.1" + redux "^4.2.1" + use-memo-one "^1.1.3" + +"@humanwhocodes/config-array@^0.11.11": + version "0.11.11" + resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.11.tgz#88a04c570dbbc7dd943e4712429c3df09bc32844" + integrity sha512-N2brEuAadi0CcdeMXUkhbZB84eskAc8MEX1By6qEchoVywSgXPIjou4rYsl0V3Hj0ZnuGycGCjdNgockbzeWNA== dependencies: "@humanwhocodes/object-schema" "^1.2.1" debug "^4.1.1" @@ -1754,7 +1742,7 @@ "@jridgewell/gen-mapping" "^0.3.0" "@jridgewell/trace-mapping" "^0.3.9" -"@jridgewell/sourcemap-codec@^1.4.10", "@jridgewell/sourcemap-codec@^1.4.13", "@jridgewell/sourcemap-codec@^1.4.14": +"@jridgewell/sourcemap-codec@^1.4.10", "@jridgewell/sourcemap-codec@^1.4.14", "@jridgewell/sourcemap-codec@^1.4.15": version "1.4.15" resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32" integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== @@ -1837,9 +1825,9 @@ integrity sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A== "@rails/ujs@^7.0.6": - version "7.0.7" - resolved "https://registry.yarnpkg.com/@rails/ujs/-/ujs-7.0.7.tgz#54af8d66160a8a7bf7d8f184703d2bf4b3fab914" - integrity sha512-J2v5Ca7HgejO7diGKiDylaVDQKmbQ5FJih6Oo3hXuBKEuXlcaccJu64lj8MNVLaPVyZx0g4gaOQZQz95QEb/hg== + version "7.0.8" + resolved "https://registry.yarnpkg.com/@rails/ujs/-/ujs-7.0.8.tgz#59853367d0827b3955d2c4bedfd5eba4a79d3422" + integrity sha512-tOQQBVH8LsUpGXqDnk+kaOGVsgZ8maHAhEiw3Git3p88q+c0Slgu47HuDnL6sVxeCfz24zbq7dOjsVYDiTpDIA== "@reduxjs/toolkit@^1.9.5": version "1.9.5" @@ -2158,9 +2146,9 @@ integrity sha512-gaBLT8pdcexFztLSPRtriHeXY/Kn4907uOCZ4Q3lncFBkheAWOuNt53ypsF8szgxbEJ513UeBzcf4utN0EzEwA== "@types/eslint@7 || 8": - version "8.40.2" - resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-8.40.2.tgz#2833bc112d809677864a4b0e7d1de4f04d7dac2d" - integrity sha512-PRVjQ4Eh9z9pmmtaq8nTjZjQwKFk7YIHIud3lRoKRBgUQjgjRmoGxxGEPXQkF+lH7QkHJRNr5F4aBgYCW0lqpQ== + version "8.44.2" + resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-8.44.2.tgz#0d21c505f98a89b8dd4d37fa162b09da6089199a" + integrity sha512-sdPRb9K6iL5XZOmBubg8yiFp5yS/JdUDQsq5e6h95km91MCYMuvp7mh1fjPEYUhvHepKpZOjnEaMBR4PxjWDzg== dependencies: "@types/estree" "*" "@types/json-schema" "*" @@ -2215,7 +2203,7 @@ resolved "https://registry.yarnpkg.com/@types/history/-/history-4.7.11.tgz#56588b17ae8f50c53983a524fc3cc47437969d64" integrity sha512-qjDJRrmvBMiTx+jyLxvLfJU7UznFuokDv4f3WRuriHKERccVpFU+8XMQUAbDzoiJCsmexxRExQeMwwCdamSKDA== -"@types/hoist-non-react-statics@^3.3.0", "@types/hoist-non-react-statics@^3.3.1": +"@types/hoist-non-react-statics@^3.3.1": version "3.3.1" resolved "https://registry.yarnpkg.com/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.1.tgz#1124aafe5118cb591977aeb1ceaaed1070eb039f" integrity sha512-iMIqiko6ooLrTh1joXodJK5X9xeEALT1kM5G3ZLhD3hszxBdIEd5C75U834D9mLcINgD4OyZf5uQXjkuYydWvA== @@ -2292,9 +2280,9 @@ integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ== "@types/lodash@^4.14.195": - version "4.14.197" - resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.197.tgz#e95c5ddcc814ec3e84c891910a01e0c8a378c54b" - integrity sha512-BMVOiWs0uNxHVlHBgzTIqJYmj+PgCo4euloGF+5m4okL3rEYzM2EEv78mw8zWSMM57dM7kVIgJ2QDvwHSoCI5g== + version "4.14.198" + resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.198.tgz#4d27465257011aedc741a809f1269941fa2c5d4c" + integrity sha512-trNJ/vtMZYMLhfN45uLq4ShQSw0/S7xCTLLVM+WM1rmFpba/VS42jVUgaO3w/NOLiWR/09lnYk0yMaA/atdIsg== "@types/mime@*": version "3.0.1" @@ -2317,9 +2305,9 @@ integrity sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ== "@types/node@*": - version "20.5.9" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.5.9.tgz#a70ec9d8fa0180a314c3ede0e20ea56ff71aed9a" - integrity sha512-PcGNd//40kHAS3sTlzKB9C9XL4K0sTup8nbG5lC14kzEteTNuAFh9u5nA0o5TWnSG2r/JNPRXFVcHJIIeRlmqQ== + version "20.6.0" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.6.0.tgz#9d7daa855d33d4efec8aea88cd66db1c2f0ebe16" + integrity sha512-najjVq5KN2vsH2U/xyh2opaSEz6cZMR2SetLIlxlj08nOcmPOemJmUK2o4kUzfLqfrWE0PIrNeE16XhYDd3nqg== "@types/node@14 || 16 || 17": version "17.0.45" @@ -2428,16 +2416,6 @@ dependencies: react-overlays "*" -"@types/react-redux@^7.1.20": - version "7.1.25" - resolved "https://registry.yarnpkg.com/@types/react-redux/-/react-redux-7.1.25.tgz#de841631205b24f9dfb4967dd4a7901e048f9a88" - integrity sha512-bAGh4e+w5D8dajd6InASVIyCo4pZLJ66oLb80F9OBLO1gKESbZcRCJpTT6uLXX+HAB57zw1WTdwJdAsewuTweg== - dependencies: - "@types/hoist-non-react-statics" "^3.3.0" - "@types/react" "*" - hoist-non-react-statics "^3.3.0" - redux "^4.0.0" - "@types/react-router-dom@^5.3.3": version "5.3.3" resolved "https://registry.yarnpkg.com/@types/react-router-dom/-/react-router-dom-5.3.3.tgz#e9d6b4a66fcdbd651a5f106c2656a30088cc1e83" @@ -2539,9 +2517,9 @@ integrity sha512-5cJ8CB4yAx7BH1oMvdU0Jh9lrEXyPkar6F9G/ERswkCuvP4KQZfZkSjcMbAICCpQTN4OuZn8tz0HiKv9TGZgrQ== "@types/semver@^7.5.0": - version "7.5.0" - resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.0.tgz#591c1ce3a702c45ee15f47a42ade72c2fd78978a" - integrity sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw== + version "7.5.1" + resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.1.tgz#0480eeb7221eb9bc398ad7432c9d7e14b1a5a367" + integrity sha512-cJRQXpObxfNKkFAZbJl2yjWtJCqELQIdShsogr1d2MilP8dKD9TE/nEKHkJgUNHdGKCQaf9HbIynuV2csLGVLg== "@types/send@*": version "0.17.1" @@ -2640,15 +2618,15 @@ "@types/yargs-parser" "*" "@typescript-eslint/eslint-plugin@^6.0.0": - version "6.4.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.4.1.tgz#bc0c6f000134b53c304ad0bec4ee4753cd3e89d2" - integrity sha512-3F5PtBzUW0dYlq77Lcqo13fv+58KDwUib3BddilE8ajPJT+faGgxmI9Sw+I8ZS22BYwoir9ZhNXcLi+S+I2bkw== + version "6.6.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.6.0.tgz#19ba09aa34fd504696445100262e5a9e1b1d7024" + integrity sha512-CW9YDGTQnNYMIo5lMeuiIG08p4E0cXrXTbcZ2saT/ETE7dWUrNxlijsQeU04qAAKkILiLzdQz+cGFxCJjaZUmA== dependencies: "@eslint-community/regexpp" "^4.5.1" - "@typescript-eslint/scope-manager" "6.4.1" - "@typescript-eslint/type-utils" "6.4.1" - "@typescript-eslint/utils" "6.4.1" - "@typescript-eslint/visitor-keys" "6.4.1" + "@typescript-eslint/scope-manager" "6.6.0" + "@typescript-eslint/type-utils" "6.6.0" + "@typescript-eslint/utils" "6.6.0" + "@typescript-eslint/visitor-keys" "6.6.0" debug "^4.3.4" graphemer "^1.4.0" ignore "^5.2.4" @@ -2657,97 +2635,97 @@ ts-api-utils "^1.0.1" "@typescript-eslint/parser@^6.0.0": - version "6.4.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-6.4.1.tgz#85ad550bf4ac4aa227504f1becb828f8e46c44e3" - integrity sha512-610G6KHymg9V7EqOaNBMtD1GgpAmGROsmfHJPXNLCU9bfIuLrkdOygltK784F6Crboyd5tBFayPB7Sf0McrQwg== + version "6.6.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-6.6.0.tgz#fe323a7b4eafb6d5ea82b96216561810394a739e" + integrity sha512-setq5aJgUwtzGrhW177/i+DMLqBaJbdwGj2CPIVFFLE0NCliy5ujIdLHd2D1ysmlmsjdL2GWW+hR85neEfc12w== dependencies: - "@typescript-eslint/scope-manager" "6.4.1" - "@typescript-eslint/types" "6.4.1" - "@typescript-eslint/typescript-estree" "6.4.1" - "@typescript-eslint/visitor-keys" "6.4.1" + "@typescript-eslint/scope-manager" "6.6.0" + "@typescript-eslint/types" "6.6.0" + "@typescript-eslint/typescript-estree" "6.6.0" + "@typescript-eslint/visitor-keys" "6.6.0" debug "^4.3.4" -"@typescript-eslint/scope-manager@6.4.1": - version "6.4.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-6.4.1.tgz#4b073a30be2dbe603e44e9ae0cff7e1d3ed19278" - integrity sha512-p/OavqOQfm4/Hdrr7kvacOSFjwQ2rrDVJRPxt/o0TOWdFnjJptnjnZ+sYDR7fi4OimvIuKp+2LCkc+rt9fIW+A== +"@typescript-eslint/scope-manager@6.6.0": + version "6.6.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-6.6.0.tgz#57105d4419d6de971f7d2c30a2ff4ac40003f61a" + integrity sha512-pT08u5W/GT4KjPUmEtc2kSYvrH8x89cVzkA0Sy2aaOUIw6YxOIjA8ilwLr/1fLjOedX1QAuBpG9XggWqIIfERw== dependencies: - "@typescript-eslint/types" "6.4.1" - "@typescript-eslint/visitor-keys" "6.4.1" + "@typescript-eslint/types" "6.6.0" + "@typescript-eslint/visitor-keys" "6.6.0" -"@typescript-eslint/type-utils@6.4.1": - version "6.4.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-6.4.1.tgz#fa21cb13016c8d6f352fe9b2d6c9ab6edc2d1857" - integrity sha512-7ON8M8NXh73SGZ5XvIqWHjgX2f+vvaOarNliGhjrJnv1vdjG0LVIz+ToYfPirOoBi56jxAKLfsLm40+RvxVVXA== +"@typescript-eslint/type-utils@6.6.0": + version "6.6.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-6.6.0.tgz#14f651d13b884915c4fca0d27adeb652a4499e86" + integrity sha512-8m16fwAcEnQc69IpeDyokNO+D5spo0w1jepWWY2Q6y5ZKNuj5EhVQXjtVAeDDqvW6Yg7dhclbsz6rTtOvcwpHg== dependencies: - "@typescript-eslint/typescript-estree" "6.4.1" - "@typescript-eslint/utils" "6.4.1" + "@typescript-eslint/typescript-estree" "6.6.0" + "@typescript-eslint/utils" "6.6.0" debug "^4.3.4" ts-api-utils "^1.0.1" -"@typescript-eslint/types@5.59.0": - version "5.59.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.59.0.tgz#3fcdac7dbf923ec5251545acdd9f1d42d7c4fe32" - integrity sha512-yR2h1NotF23xFFYKHZs17QJnB51J/s+ud4PYU4MqdZbzeNxpgUr05+dNeCN/bb6raslHvGdd6BFCkVhpPk/ZeA== +"@typescript-eslint/types@5.62.0": + version "5.62.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.62.0.tgz#258607e60effa309f067608931c3df6fed41fd2f" + integrity sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ== -"@typescript-eslint/types@6.4.1": - version "6.4.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-6.4.1.tgz#b2c61159f46dda210fed9f117f5d027f65bb5c3b" - integrity sha512-zAAopbNuYu++ijY1GV2ylCsQsi3B8QvfPHVqhGdDcbx/NK5lkqMnCGU53amAjccSpk+LfeONxwzUhDzArSfZJg== +"@typescript-eslint/types@6.6.0": + version "6.6.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-6.6.0.tgz#95e7ea650a2b28bc5af5ea8907114a48f54618c2" + integrity sha512-CB6QpJQ6BAHlJXdwUmiaXDBmTqIE2bzGTDLADgvqtHWuhfNP3rAOK7kAgRMAET5rDRr9Utt+qAzRBdu3AhR3sg== -"@typescript-eslint/typescript-estree@5.59.0": - version "5.59.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.59.0.tgz#8869156ee1dcfc5a95be3ed0e2809969ea28e965" - integrity sha512-sUNnktjmI8DyGzPdZ8dRwW741zopGxltGs/SAPgGL/AAgDpiLsCFLcMNSpbfXfmnNeHmK9h3wGmCkGRGAoUZAg== +"@typescript-eslint/typescript-estree@5.62.0": + version "5.62.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz#7d17794b77fabcac615d6a48fb143330d962eb9b" + integrity sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA== dependencies: - "@typescript-eslint/types" "5.59.0" - "@typescript-eslint/visitor-keys" "5.59.0" + "@typescript-eslint/types" "5.62.0" + "@typescript-eslint/visitor-keys" "5.62.0" debug "^4.3.4" globby "^11.1.0" is-glob "^4.0.3" semver "^7.3.7" tsutils "^3.21.0" -"@typescript-eslint/typescript-estree@6.4.1": - version "6.4.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-6.4.1.tgz#91ff88101c710adb0f70a317f2f65efa9441da45" - integrity sha512-xF6Y7SatVE/OyV93h1xGgfOkHr2iXuo8ip0gbfzaKeGGuKiAnzS+HtVhSPx8Www243bwlW8IF7X0/B62SzFftg== +"@typescript-eslint/typescript-estree@6.6.0": + version "6.6.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-6.6.0.tgz#373c420d2e12c28220f4a83352280a04823a91b7" + integrity sha512-hMcTQ6Al8MP2E6JKBAaSxSVw5bDhdmbCEhGW/V8QXkb9oNsFkA4SBuOMYVPxD3jbtQ4R/vSODBsr76R6fP3tbA== dependencies: - "@typescript-eslint/types" "6.4.1" - "@typescript-eslint/visitor-keys" "6.4.1" + "@typescript-eslint/types" "6.6.0" + "@typescript-eslint/visitor-keys" "6.6.0" debug "^4.3.4" globby "^11.1.0" is-glob "^4.0.3" semver "^7.5.4" ts-api-utils "^1.0.1" -"@typescript-eslint/utils@6.4.1": - version "6.4.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-6.4.1.tgz#81bf62ff0c3119a26c19fab683582e29450717bc" - integrity sha512-F/6r2RieNeorU0zhqZNv89s9bDZSovv3bZQpUNOmmQK1L80/cV4KEu95YUJWi75u5PhboFoKUJBnZ4FQcoqhDw== +"@typescript-eslint/utils@6.6.0": + version "6.6.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-6.6.0.tgz#2d686c0f0786da6362d909e27a9de1c13ba2e7dc" + integrity sha512-mPHFoNa2bPIWWglWYdR0QfY9GN0CfvvXX1Sv6DlSTive3jlMTUy+an67//Gysc+0Me9pjitrq0LJp0nGtLgftw== dependencies: "@eslint-community/eslint-utils" "^4.4.0" "@types/json-schema" "^7.0.12" "@types/semver" "^7.5.0" - "@typescript-eslint/scope-manager" "6.4.1" - "@typescript-eslint/types" "6.4.1" - "@typescript-eslint/typescript-estree" "6.4.1" + "@typescript-eslint/scope-manager" "6.6.0" + "@typescript-eslint/types" "6.6.0" + "@typescript-eslint/typescript-estree" "6.6.0" semver "^7.5.4" -"@typescript-eslint/visitor-keys@5.59.0": - version "5.59.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.59.0.tgz#a59913f2bf0baeb61b5cfcb6135d3926c3854365" - integrity sha512-qZ3iXxQhanchCeaExlKPV3gDQFxMUmU35xfd5eCXB6+kUw1TUAbIy2n7QIrwz9s98DQLzNWyHp61fY0da4ZcbA== +"@typescript-eslint/visitor-keys@5.62.0": + version "5.62.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz#2174011917ce582875954ffe2f6912d5931e353e" + integrity sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw== dependencies: - "@typescript-eslint/types" "5.59.0" + "@typescript-eslint/types" "5.62.0" eslint-visitor-keys "^3.3.0" -"@typescript-eslint/visitor-keys@6.4.1": - version "6.4.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-6.4.1.tgz#e3ccf7b8d42e625946ac5094ed92a405fb4115e0" - integrity sha512-y/TyRJsbZPkJIZQXrHfdnxVnxyKegnpEvnRGNam7s3TRR2ykGefEWOhaef00/UUN3IZxizS7BTO3svd3lCOJRQ== +"@typescript-eslint/visitor-keys@6.6.0": + version "6.6.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-6.6.0.tgz#1109088b4346c8b2446f3845db526374d9a3bafc" + integrity sha512-L61uJT26cMOfFQ+lMZKoJNbAEckLe539VhTxiGHrWl5XSKQgA0RTBZJW2HFPy5T0ZvPVSD93QsrTKDkfNwJGyQ== dependencies: - "@typescript-eslint/types" "6.4.1" + "@typescript-eslint/types" "6.6.0" eslint-visitor-keys "^3.4.1" "@webassemblyjs/ast@1.9.0": @@ -3418,17 +3396,17 @@ babel-loader@^8.3.0: schema-utils "^2.6.5" babel-plugin-formatjs@^10.5.1: - version "10.5.4" - resolved "https://registry.yarnpkg.com/babel-plugin-formatjs/-/babel-plugin-formatjs-10.5.4.tgz#98837caedcdb64f118048f19e59ad0c94f55b5aa" - integrity sha512-6JSpDS/YVjMu74NzHkuEduWqDsmUbUm1qc6sNeccgknixW9Z3hbQqv3Fvfjrh4opBzJ+CRaAZaUlQQL+xDTQzw== + version "10.5.5" + resolved "https://registry.yarnpkg.com/babel-plugin-formatjs/-/babel-plugin-formatjs-10.5.5.tgz#678e35d5a06103030d7d6205592779d235a25591" + integrity sha512-p7q/kJ+ss1xY2b3tTePllIi2xWJDRRBGw2kFV8Ve18uYG0eMn3xoEq3zW1GLQTJpdWzL++qTyTJ0oj428nzU6Q== dependencies: "@babel/core" "^7.10.4" "@babel/helper-plugin-utils" "^7.10.4" "@babel/plugin-syntax-jsx" "7" "@babel/traverse" "7" "@babel/types" "^7.12.11" - "@formatjs/icu-messageformat-parser" "2.6.1" - "@formatjs/ts-transformer" "3.13.4" + "@formatjs/icu-messageformat-parser" "2.6.2" + "@formatjs/ts-transformer" "3.13.5" "@types/babel__core" "^7.1.7" "@types/babel__helper-plugin-utils" "^7.10.0" "@types/babel__traverse" "^7.1.7" @@ -3967,9 +3945,9 @@ caniuse-lite@^1.0.30001502: integrity sha512-eEFDwUOZbE24sb+Ecsx3+OvNETqjWIdabMy52oOkIgcUtAsQifjUG9q4U9dgTHJM2mfk4uEPxc0+xuFdJ629QA== caniuse-lite@^1.0.30001517: - version "1.0.30001528" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001528.tgz#479972fc705b996f1114336c0032418a215fd0aa" - integrity sha512-0Db4yyjR9QMNlsxh+kKWzQtkyflkG/snYheSzkjmvdEtEXB1+jt7A2HmSEiO6XIJPIbo92lHNGNySvE5pZcs5Q== + version "1.0.30001532" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001532.tgz#c6a4d5d2da6d2b967f0ee5e12e7f680db6ad2fca" + integrity sha512-FbDFnNat3nMnrROzqrsg314zhqN5LGQ1kyyMk2opcrwGbVGpHRhgCWtAgD5YJUqNAiQ+dklreil/c3Qf1dfCTw== caniuse-lite@^1.0.30001520: version "1.0.30001520" @@ -4481,7 +4459,7 @@ crypto-random-string@^2.0.0: resolved "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-2.0.0.tgz#ef2a7a966ec11083388369baa02ebead229b30d5" integrity sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA== -css-box-model@^1.2.0: +css-box-model@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/css-box-model/-/css-box-model-1.2.1.tgz#59951d3b81fd6b2074a62d49444415b0d2b4d7c1" integrity sha512-a7Vr4Q/kd/aw96bnJG332W9V9LkJO69JRcaCYDUqjp6/z0w6VcZjgAcTbgFxEPfBgdnAwlh3iwu+hLopa+flJw== @@ -5121,9 +5099,9 @@ electron-to-chromium@^1.4.428: integrity sha512-/g3UyNDmDd6ebeWapmAoiyy+Sy2HyJ+/X8KyvNeHfKRFfHaA2W8oF5fxD5F3tjBDcjpwo0iek6YNgxNXDBoEtA== electron-to-chromium@^1.4.477: - version "1.4.510" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.510.tgz#446c50d7533c1e71a84b00a3b37ab06dd601d890" - integrity sha512-xPfLIPFcN/WLXBpQ/K4UgE98oUBO5Tia6BD4rkSR0wE7ep/PwBVlgvPJQrIBpmJGVAmUzwPKuDbVt9XV6+uC2g== + version "1.4.513" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.513.tgz#41a50bf749aa7d8058ffbf7a131fc3327a7b1675" + integrity sha512-cOB0xcInjm+E5qIssHeXJ29BaUyWpMyFKT5RB3bsLENDheCja0wMkHJyiPl0NBE/VzDI7JDuNEQWhe6RitEUcw== elliptic@^6.5.3: version "6.5.4" @@ -5418,19 +5396,19 @@ eslint-module-utils@^2.7.4, eslint-module-utils@^2.8.0: debug "^3.2.7" eslint-plugin-formatjs@^4.10.1: - version "4.10.3" - resolved "https://registry.yarnpkg.com/eslint-plugin-formatjs/-/eslint-plugin-formatjs-4.10.3.tgz#65882730aebee3c8b6eec06381a4b0a18c0d33bd" - integrity sha512-EHKuEMCmWhAiMdCc8oZU8qBAvnvHPUiJuhGxPqA+GX2Nb7GBsGm2o616KYnSSffDisK+v0E9TDCrS8oJ0QLgcw== + version "4.10.5" + resolved "https://registry.yarnpkg.com/eslint-plugin-formatjs/-/eslint-plugin-formatjs-4.10.5.tgz#3b38ce5da1f8e9d135298df777cf87115e4d0818" + integrity sha512-pBPA4idiYHXPQMrIb9/Le+D0snlNa7MFQsw12yIzyva/z9uz0u/4NOK3NkfyENMBNMeTX2tZXtugk9FyqM5SRw== dependencies: - "@formatjs/icu-messageformat-parser" "2.6.0" - "@formatjs/ts-transformer" "3.13.3" + "@formatjs/icu-messageformat-parser" "2.6.2" + "@formatjs/ts-transformer" "3.13.5" "@types/eslint" "7 || 8" "@types/picomatch" "^2.3.0" - "@typescript-eslint/typescript-estree" "5.59.0" + "@typescript-eslint/typescript-estree" "5.62.0" emoji-regex "^10.2.1" magic-string "^0.30.0" picomatch "^2.3.1" - tslib "2.5.0" + tslib "2.6.0" typescript "^4.7 || 5" unicode-emoji-utils "^1.1.1" @@ -5458,9 +5436,9 @@ eslint-plugin-import@~2.28.0: tsconfig-paths "^3.14.2" eslint-plugin-jsdoc@^46.1.0: - version "46.5.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-46.5.0.tgz#02e7945701a01fab76e7ced850d4d1eea63c23c0" - integrity sha512-aulXdA4I1dyWpzyS1Nh/GNoS6PavzeucxEapnMR4JUERowWvaEk2Y4A5irpHAcdXtBBHLVe8WIhdXNjoAlGQgA== + version "46.6.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-46.6.0.tgz#513e41911a3081a15fe6a94490002e8d8f7b71d9" + integrity sha512-T/1gzsvnX45qABzyPEonEhFDttkTn7Igm/X89TXIkTLBOsNl2GYtyBqQPZGXZZ8J5VBzEhiCMvI2P2kXX4dnFw== dependencies: "@es-joy/jsdoccomment" "~0.40.1" are-docs-informative "^0.0.2" @@ -5556,15 +5534,15 @@ eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4 integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== eslint@^8.41.0: - version "8.48.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.48.0.tgz#bf9998ba520063907ba7bfe4c480dc8be03c2155" - integrity sha512-sb6DLeIuRXxeM1YljSe1KEx9/YYeZFQWcV8Rq9HfigmdDEugjLEVEa1ozDjL6YDjBpQHPJxJzze+alxi4T3OLg== + version "8.49.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.49.0.tgz#09d80a89bdb4edee2efcf6964623af1054bf6d42" + integrity sha512-jw03ENfm6VJI0jA9U+8H5zfl5b+FvuU3YYvZRdZHOlU2ggJkxrlkJH4HcDrZpj6YwD8kuYqvQM8LyesoazrSOQ== dependencies: "@eslint-community/eslint-utils" "^4.2.0" "@eslint-community/regexpp" "^4.6.1" "@eslint/eslintrc" "^2.1.2" - "@eslint/js" "8.48.0" - "@humanwhocodes/config-array" "^0.11.10" + "@eslint/js" "8.49.0" + "@humanwhocodes/config-array" "^0.11.11" "@humanwhocodes/module-importer" "^1.0.1" "@nodelib/fs.walk" "^1.2.8" ajv "^6.12.4" @@ -6844,14 +6822,14 @@ intersection-observer@^0.12.0: resolved "https://registry.yarnpkg.com/intersection-observer/-/intersection-observer-0.12.2.tgz#4a45349cc0cd91916682b1f44c28d7ec737dc375" integrity sha512-7m1vEcPCxXYI8HqnL8CKI6siDyD+eIWSwgB3DZA+ZTogxk9I4CDnj4wilt9x/+/QbHI4YG5YZNmC6458/e9Ktg== -intl-messageformat@10.5.1, intl-messageformat@^10.3.5: - version "10.5.1" - resolved "https://registry.yarnpkg.com/intl-messageformat/-/intl-messageformat-10.5.1.tgz#40304cbde01c8cb2236e11ac8c827642bed474d0" - integrity sha512-irEmjxHq0f1MHviQr3Q4ToF9EgYbnXDq2/R9MRTTveGKHgy6VZ29hQxswu4trqWaX7T6njKxSoKVG92OSz0U5Q== +intl-messageformat@10.5.2, intl-messageformat@^10.3.5: + version "10.5.2" + resolved "https://registry.yarnpkg.com/intl-messageformat/-/intl-messageformat-10.5.2.tgz#eb746b4b895bd37e8ef91be7b488e450aa4e9d7b" + integrity sha512-X4rlUNbgCc8/RdMhmvUEEZ38yNDn5S4r0u8n8yQH2OOdhsR46SmOuQsCKG35nRXmL5u2nxPsNN6qNhHoMm6FMQ== dependencies: - "@formatjs/ecma402-abstract" "1.17.1" + "@formatjs/ecma402-abstract" "1.17.2" "@formatjs/fast-memoize" "2.2.0" - "@formatjs/icu-messageformat-parser" "2.6.1" + "@formatjs/icu-messageformat-parser" "2.6.2" tslib "^2.4.0" invariant@^2.2.2, invariant@^2.2.4: @@ -8295,11 +8273,11 @@ magic-string@^0.25.0, magic-string@^0.25.7: sourcemap-codec "^1.4.8" magic-string@^0.30.0: - version "0.30.0" - resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.30.0.tgz#fd58a4748c5c4547338a424e90fa5dd17f4de529" - integrity sha512-LA+31JYDJLs82r2ScLrlz1GjSgu66ZV518eyWT+S8VhyQn/JL0u9MeBOvQMGYiPk1DBiSN9DDMOcXvigJZaViQ== + version "0.30.3" + resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.30.3.tgz#403755dfd9d6b398dfa40635d52e96c5ac095b85" + integrity sha512-B7xGbll2fG/VjP+SWg4sX3JynwIU0mjoTc6MPpKNuIvftk6u6vqhDnk1R80b8C2GBR6ywqy+1DcKBrevBg+bmw== dependencies: - "@jridgewell/sourcemap-codec" "^1.4.13" + "@jridgewell/sourcemap-codec" "^1.4.15" make-dir@^3.0.2, make-dir@^3.1.0: version "3.1.0" @@ -8393,11 +8371,6 @@ media-typer@0.3.0: resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" integrity sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ== -memoize-one@^5.1.1: - version "5.2.1" - resolved "https://registry.yarnpkg.com/memoize-one/-/memoize-one-5.2.1.tgz#8337aa3c4335581839ec01c3d594090cebe8f00e" - integrity sha512-zYiwtZUcYyXKo/np96AGZAckk+FWWsUdJ3cHGGmld7+AhvcWmQyGCYUh1hc4Q/pkOhb65dQR/pqCyK0cOaHz4Q== - memoize-one@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/memoize-one/-/memoize-one-6.0.0.tgz#b2591b871ed82948aee4727dc6abceeeac8c1045" @@ -9949,7 +9922,7 @@ quick-lru@^5.1.1: resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-5.1.1.tgz#366493e6b3e42a3a6885e2e99d18f80fb7a8c932" integrity sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA== -raf-schd@^4.0.2: +raf-schd@^4.0.3: version "4.0.3" resolved "https://registry.yarnpkg.com/raf-schd/-/raf-schd-4.0.3.tgz#5d6c34ef46f8b2a0e880a8fcdb743efc5bfdbc1a" integrity sha512-tQkJl2GRWh83ui2DiPTJz9wEiMN20syf+5oKfB03yYP7ioZcJwsIK8FjrtLwH1m7C7e+Tt2yYBlrOpdT+dyeIQ== @@ -9991,19 +9964,6 @@ raw-body@2.5.1: iconv-lite "0.4.24" unpipe "1.0.0" -react-beautiful-dnd@^13.1.1: - version "13.1.1" - resolved "https://registry.yarnpkg.com/react-beautiful-dnd/-/react-beautiful-dnd-13.1.1.tgz#b0f3087a5840920abf8bb2325f1ffa46d8c4d0a2" - integrity sha512-0Lvs4tq2VcrEjEgDXHjT98r+63drkKEgqyxdA7qD3mvKwga6a5SscbdLPO2IExotU1jW8L0Ksdl0Cj2AF67nPQ== - dependencies: - "@babel/runtime" "^7.9.2" - css-box-model "^1.2.0" - memoize-one "^5.1.1" - raf-schd "^4.0.2" - react-redux "^7.2.0" - redux "^4.0.4" - use-memo-one "^1.1.1" - react-dom@^18.2.0: version "18.2.0" resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-18.2.0.tgz#22aaf38708db2674ed9ada224ca4aa708d821e3d" @@ -10060,19 +10020,19 @@ react-immutable-pure-component@^2.2.2: integrity sha512-vkgoMJUDqHZfXXnjVlG3keCxSO/U6WeDQ5/Sl0GK2cH8TOxEzQ5jXqDXHEL/jqk6fsNxV05oH5kD7VNMUE2k+A== react-intl@^6.4.2: - version "6.4.5" - resolved "https://registry.yarnpkg.com/react-intl/-/react-intl-6.4.5.tgz#d8f61fce2fb3be08ef58deb35d96b964e1ef013a" - integrity sha512-nUO2W57Tmdu6ErhsOFpsgkEtfQ4Lo7hPrXn8gGJQx59NRC0FNUxRc6+Ah3G8j6vqBiYRmxsLJpVZtIhLZjhYLA== + version "6.4.6" + resolved "https://registry.yarnpkg.com/react-intl/-/react-intl-6.4.6.tgz#64e3a615f1d30e0d75d081a5edaa85eb29c9c2eb" + integrity sha512-8FiQ1GO6vm0wuO4B7yls9wIbINIo6ZH91geuwyR0VtwfhPc9+ONXKVfzwzkr/GZnwKW93nmH43MS+NSkmttIaA== dependencies: - "@formatjs/ecma402-abstract" "1.17.1" - "@formatjs/icu-messageformat-parser" "2.6.1" - "@formatjs/intl" "2.9.1" - "@formatjs/intl-displaynames" "6.5.1" - "@formatjs/intl-listformat" "7.4.1" + "@formatjs/ecma402-abstract" "1.17.2" + "@formatjs/icu-messageformat-parser" "2.6.2" + "@formatjs/intl" "2.9.2" + "@formatjs/intl-displaynames" "6.5.2" + "@formatjs/intl-listformat" "7.4.2" "@types/hoist-non-react-statics" "^3.3.1" "@types/react" "16 || 17 || 18" hoist-non-react-statics "^3.3.2" - intl-messageformat "10.5.1" + intl-messageformat "10.5.2" tslib "^2.4.0" "react-is@^16.12.0 || ^17.0.0 || ^18.0.0", react-is@^18.0.0, react-is@^18.2.0: @@ -10085,7 +10045,7 @@ react-is@^16.13.1, react-is@^16.7.0: resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== -react-is@^17.0.1, react-is@^17.0.2: +react-is@^17.0.1: version "17.0.2" resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.2.tgz#e691d4a8e9c789365655539ab372762b0efb54f0" integrity sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w== @@ -10133,19 +10093,7 @@ react-redux-loading-bar@^5.0.4: prop-types "^15.7.2" react-lifecycles-compat "^3.0.4" -react-redux@^7.2.0: - version "7.2.9" - resolved "https://registry.yarnpkg.com/react-redux/-/react-redux-7.2.9.tgz#09488fbb9416a4efe3735b7235055442b042481d" - integrity sha512-Gx4L3uM182jEEayZfRbI/G11ZpYdNAnBs70lFVMNdHJI76XYtR+7m0MN+eAs7UHBPhWXcnFPaS+9owSCJQHNpQ== - dependencies: - "@babel/runtime" "^7.15.4" - "@types/react-redux" "^7.1.20" - hoist-non-react-statics "^3.3.2" - loose-envify "^1.4.0" - prop-types "^15.7.2" - react-is "^17.0.2" - -react-redux@^8.0.4: +react-redux@^8.0.4, react-redux@^8.1.1: version "8.1.2" resolved "https://registry.yarnpkg.com/react-redux/-/react-redux-8.1.2.tgz#9076bbc6b60f746659ad6d51cb05de9c5e1e9188" integrity sha512-xJKYI189VwfsFc4CJvHqHlDrzyFTY/3vZACbE+rr/zQ34Xx1wQfB4OTOSeOSNrF6BDVe8OOdxIrAnMGXA3ggfw== @@ -10403,7 +10351,7 @@ redux-thunk@^2.4.2: resolved "https://registry.yarnpkg.com/redux-thunk/-/redux-thunk-2.4.2.tgz#b9d05d11994b99f7a91ea223e8b04cf0afa5ef3b" integrity sha512-+P3TjtnP0k/FEjcBL5FZpoovtvrTNT/UXd4/sluaSyrURlSlhLSzEdfsTBW7WsKB6yPvgd7q/iZPICFjW4o57Q== -redux@^4.0.0, redux@^4.0.4, redux@^4.2.1: +redux@^4.0.0, redux@^4.2.1: version "4.2.1" resolved "https://registry.yarnpkg.com/redux/-/redux-4.2.1.tgz#c08f4306826c49b5e9dc901dee0452ea8fce6197" integrity sha512-LAUYz4lc+Do8/g7aeRa8JkyDErK6ekstQaqWQrNRW//MY1TvCEpMtpTWvlQ+FPbWCx+Xixu/6SHt5N0HR+SB4w== @@ -10863,14 +10811,14 @@ semver@^6.0.0, semver@^6.3.0, semver@^6.3.1: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== -semver@^7.3.2, semver@^7.3.7: +semver@^7.3.2: version "7.5.1" resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.1.tgz#c90c4d631cf74720e46b21c1d37ea07edfab91ec" integrity sha512-Wvss5ivl8TMRZXXESstBA4uR5iXgEN/VC5/sOcuXdVLzcdkz4HWetIoRfG5gb5X+ij/G9rw9YoGn3QoQ8OCSpw== dependencies: lru-cache "^6.0.0" -semver@^7.3.4, semver@^7.3.5, semver@^7.5.3, semver@^7.5.4: +semver@^7.3.4, semver@^7.3.5, semver@^7.3.7, semver@^7.5.3, semver@^7.5.4: version "7.5.4" resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== @@ -12015,9 +11963,9 @@ trim-newlines@^4.0.2: integrity sha512-jRKj0n0jXWo6kh62nA5TEh3+4igKDXLvzBJcPpiizP7oOolUrYIxmVBG9TOtHYFHoddUk6YvAkGeGoSVTXfQXQ== ts-api-utils@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-1.0.2.tgz#7c094f753b6705ee4faee25c3c684ade52d66d99" - integrity sha512-Cbu4nIqnEdd+THNEsBdkolnOXhg0I8XteoHaEKgvsxpsbWda4IsUut2c187HxywQCvveojow0Dgw/amxtSKVkQ== + version "1.0.3" + resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-1.0.3.tgz#f12c1c781d04427313dbac808f453f050e54a331" + integrity sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg== tsconfig-paths@^3.14.2: version "3.14.2" @@ -12029,10 +11977,10 @@ tsconfig-paths@^3.14.2: minimist "^1.2.6" strip-bom "^3.0.0" -tslib@2.5.0: - version "2.5.0" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.5.0.tgz#42bfed86f5787aeb41d031866c8f402429e0fddf" - integrity sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg== +tslib@2.6.0: + version "2.6.0" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.0.tgz#b295854684dbda164e181d259a22cd779dcd7bc3" + integrity sha512-7At1WUettjcSRHXCyYtTselblcHl9PJFFVKiCAy/bY97+BPZXSQ2wbq0P9s8tK2G7dFQfNnlJnPAiArVBVBsfA== tslib@^1.8.1: version "1.14.1" @@ -12337,7 +12285,7 @@ use-latest@^1.2.1: dependencies: use-isomorphic-layout-effect "^1.1.1" -use-memo-one@^1.1.1: +use-memo-one@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/use-memo-one/-/use-memo-one-1.1.3.tgz#2fd2e43a2169eabc7496960ace8c79efef975e99" integrity sha512-g66/K7ZQGYrI6dy8GLpVcMsBp4s17xNkYJVSMvTEevGy3nDxHOfE6z8BVE22+5G5x7t3+bhzrlTDB7ObrEE0cQ== @@ -12404,9 +12352,9 @@ uuid@^8.3.2: integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== uuid@^9.0.0: - version "9.0.0" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-9.0.0.tgz#592f550650024a38ceb0c562f2f6aa435761efb5" - integrity sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg== + version "9.0.1" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-9.0.1.tgz#e188d4c8853cc722220392c424cd637f32293f30" + integrity sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA== v8-compile-cache@^2.1.1: version "2.3.0" @@ -13056,9 +13004,9 @@ ws@^7.3.1: integrity sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q== ws@^8.11.0, ws@^8.12.1, ws@^8.13.0: - version "8.14.0" - resolved "https://registry.yarnpkg.com/ws/-/ws-8.14.0.tgz#6c5792c5316dc9266ba8e780433fc45e6680aecd" - integrity sha512-WR0RJE9Ehsio6U4TuM+LmunEsjQ5ncHlw4sn9ihD6RoJKZrVyH9FWV3dmnwu8B2aNib1OvG2X6adUCyFpQyWcg== + version "8.14.1" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.14.1.tgz#4b9586b4f70f9e6534c7bb1d3dc0baa8b8cf01e0" + integrity sha512-4OOseMUq8AzRBI/7SLMUwO+FEDnguetSk7KMb1sHwvF2w2Wv5Hoj0nlifx8vtGsftE/jWHojPy8sMMzYLJ2G/A== xml-name-validator@^4.0.0: version "4.0.0" From 258a29ffde47abb6b1e3edefffd1d2087ec44e87 Mon Sep 17 00:00:00 2001 From: KMY Date: Thu, 14 Sep 2023 18:39:13 +0900 Subject: [PATCH 03/15] Add unlisted-public tag/circle/list tests --- app/models/public_feed.rb | 7 +- app/models/tag_feed.rb | 3 +- .../v1/circles/accounts_controller_spec.rb | 92 ++++++++++++++ .../api/v1/circles_controller_spec.rb | 50 ++++++++ .../api/v1/lists_controller_spec.rb | 50 ++++++++ spec/models/tag_feed_spec.rb | 42 +++++++ .../services/fan_out_on_write_service_spec.rb | 119 +++++++++++++++++- 7 files changed, 360 insertions(+), 3 deletions(-) create mode 100644 spec/controllers/api/v1/circles/accounts_controller_spec.rb create mode 100644 spec/controllers/api/v1/circles_controller_spec.rb create mode 100644 spec/controllers/api/v1/lists_controller_spec.rb diff --git a/app/models/public_feed.rb b/app/models/public_feed.rb index 1ed68e45e9..a641e77039 100644 --- a/app/models/public_feed.rb +++ b/app/models/public_feed.rb @@ -28,7 +28,8 @@ class PublicFeed scope.merge!(account_filters_scope) if account? scope.merge!(media_only_scope) if media_only? scope.merge!(language_scope) if account&.chosen_languages.present? - scope.merge!(anonymous_scope) unless account? + # scope.merge!(anonymous_scope) unless account? + scope = to_anonymous_scope(scope) unless account? scope.cache_ids.to_a_paginated_by_id(limit, max_id: max_id, since_id: since_id, min_id: min_id) end @@ -105,6 +106,10 @@ class PublicFeed local_only? ? Status.where(visibility: [:public, :public_unlisted]) : Status.where(visibility: :public) end + def to_anonymous_scope(scope) + scope.where.not(visibility: :login) + end + def account_filters_scope Status.not_excluded_by_account(account).tap do |scope| scope.merge!(Status.not_domain_blocked_by_account(account)) unless local_only? diff --git a/app/models/tag_feed.rb b/app/models/tag_feed.rb index 14f4afe737..9c679a0249 100644 --- a/app/models/tag_feed.rb +++ b/app/models/tag_feed.rb @@ -32,7 +32,8 @@ class TagFeed < PublicFeed scope.merge!(remote_only_scope) if remote_only? || hide_local_users? scope.merge!(account_filters_scope) if account? scope.merge!(media_only_scope) if media_only? - scope.merge!(anonymous_scope) unless account? + # scope.merge!(anonymous_scope) unless account? + scope = to_anonymous_scope(scope) unless account? scope.cache_ids.to_a_paginated_by_id(limit, max_id: max_id, since_id: since_id, min_id: min_id) end diff --git a/spec/controllers/api/v1/circles/accounts_controller_spec.rb b/spec/controllers/api/v1/circles/accounts_controller_spec.rb new file mode 100644 index 0000000000..bddd8aa211 --- /dev/null +++ b/spec/controllers/api/v1/circles/accounts_controller_spec.rb @@ -0,0 +1,92 @@ +# frozen_string_literal: true + +require 'rails_helper' + +describe Api::V1::Circles::AccountsController do + render_views + + let(:user) { Fabricate(:user) } + let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } + let(:circle) { Fabricate(:circle, account: user.account) } + let(:follow) { Fabricate(:follow, target_account: user.account) } + + before do + circle.accounts << follow.account + allow(controller).to receive(:doorkeeper_token) { token } + end + + describe 'GET #index' do + let(:scopes) { 'read:lists' } + + it 'returns http success' do + get :show, params: { circle_id: circle.id } + + expect(response).to have_http_status(200) + end + end + + describe 'POST #create' do + let(:scopes) { 'write:lists' } + let(:bob) { Fabricate(:account, username: 'bob') } + + context 'when the added account is followed' do + before do + bob.follow!(user.account) + post :create, params: { circle_id: circle.id, account_ids: [bob.id] } + end + + it 'returns http success' do + expect(response).to have_http_status(200) + end + + it 'adds account to the circle' do + expect(circle.accounts.include?(bob)).to be true + end + end + + context 'when the added account has been sent a follow request' do + before do + bob.follow_requests.create!(target_account: user.account) + post :create, params: { circle_id: circle.id, account_ids: [bob.id] } + end + + it 'returns http success' do + expect(response).to have_http_status(404) + end + + it 'adds account to the circle' do + expect(circle.accounts.include?(bob)).to be false + end + end + + context 'when the added account is not followed' do + before do + post :create, params: { circle_id: circle.id, account_ids: [bob.id] } + end + + it 'returns http not found' do + expect(response).to have_http_status(404) + end + + it 'does not add the account to the circle' do + expect(circle.accounts.include?(bob)).to be false + end + end + end + + describe 'DELETE #destroy' do + let(:scopes) { 'write:lists' } + + before do + delete :destroy, params: { circle_id: circle.id, account_ids: [circle.accounts.first.id] } + end + + it 'returns http success' do + expect(response).to have_http_status(200) + end + + it 'removes account from the circle' do + expect(circle.accounts.count).to eq 0 + end + end +end diff --git a/spec/controllers/api/v1/circles_controller_spec.rb b/spec/controllers/api/v1/circles_controller_spec.rb new file mode 100644 index 0000000000..1aff55e65b --- /dev/null +++ b/spec/controllers/api/v1/circles_controller_spec.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true + +require 'rails_helper' + +describe Api::V1::CirclesController do + render_views + + let(:user) { Fabricate(:user) } + let(:circle) { Fabricate(:circle, account: user.account) } + + before do + allow(controller).to receive(:doorkeeper_token) { token } + end + + context 'with a user context' do + let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: 'read:lists') } + + describe 'GET #show' do + it 'returns http success' do + get :show, params: { id: circle.id } + expect(response).to have_http_status(200) + end + end + end + + context 'with the wrong user context' do + let(:other_user) { Fabricate(:user) } + let(:token) { Fabricate(:accessible_access_token, resource_owner_id: other_user.id, scopes: 'read') } + + describe 'GET #show' do + it 'returns http not found' do + get :show, params: { id: circle.id } + expect(response).to have_http_status(404) + end + end + end + + context 'without a user context' do + let(:token) { Fabricate(:accessible_access_token, resource_owner_id: nil, scopes: 'read') } + + describe 'GET #show' do + it 'returns http unprocessable entity' do + get :show, params: { id: circle.id } + + expect(response).to have_http_status(422) + expect(response.headers['Link']).to be_nil + end + end + end +end diff --git a/spec/controllers/api/v1/lists_controller_spec.rb b/spec/controllers/api/v1/lists_controller_spec.rb new file mode 100644 index 0000000000..b54f3f70fa --- /dev/null +++ b/spec/controllers/api/v1/lists_controller_spec.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true + +require 'rails_helper' + +describe Api::V1::ListsController do + render_views + + let(:user) { Fabricate(:user) } + let(:list) { Fabricate(:list, account: user.account) } + + before do + allow(controller).to receive(:doorkeeper_token) { token } + end + + context 'with a user context' do + let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: 'read:lists') } + + describe 'GET #show' do + it 'returns http success' do + get :show, params: { id: list.id } + expect(response).to have_http_status(200) + end + end + end + + context 'with the wrong user context' do + let(:other_user) { Fabricate(:user) } + let(:token) { Fabricate(:accessible_access_token, resource_owner_id: other_user.id, scopes: 'read') } + + describe 'GET #show' do + it 'returns http not found' do + get :show, params: { id: list.id } + expect(response).to have_http_status(404) + end + end + end + + context 'without a user context' do + let(:token) { Fabricate(:accessible_access_token, resource_owner_id: nil, scopes: 'read') } + + describe 'GET #show' do + it 'returns http unprocessable entity' do + get :show, params: { id: list.id } + + expect(response).to have_http_status(422) + expect(response.headers['Link']).to be_nil + end + end + end +end diff --git a/spec/models/tag_feed_spec.rb b/spec/models/tag_feed_spec.rb index 6f5e1eb307..270797ccd8 100644 --- a/spec/models/tag_feed_spec.rb +++ b/spec/models/tag_feed_spec.rb @@ -66,5 +66,47 @@ describe TagFeed, type: :service do results = described_class.new(tag_cats, nil).get(20) expect(results).to include(status) end + + it 'public_unlisted post returns' do + status_tagged_with_cats.update(visibility: :public_unlisted) + results = described_class.new(tag_cats, nil).get(20) + expect(results).to include status_tagged_with_cats + end + + it 'unlisted post not returns' do + status_tagged_with_cats.update(visibility: :unlisted) + results = described_class.new(tag_cats, nil).get(20) + expect(results).to_not include status_tagged_with_cats + end + + it 'unlisted post not returns with account' do + status_tagged_with_cats.update(visibility: :unlisted) + results = described_class.new(tag_cats, account).get(20) + expect(results).to_not include status_tagged_with_cats + end + + it 'unlisted/public_searchability post returns' do + status_tagged_with_cats.update(visibility: :unlisted, searchability: :public) + results = described_class.new(tag_cats, nil).get(20) + expect(results).to include status_tagged_with_cats + end + + it 'unlisted/public_searchability post returns with account' do + status_tagged_with_cats.update(visibility: :unlisted, searchability: :public) + results = described_class.new(tag_cats, account).get(20) + expect(results).to include status_tagged_with_cats + end + + it 'private post not returns' do + status_tagged_with_cats.update(visibility: :private, searchability: :public) + results = described_class.new(tag_cats, nil).get(20) + expect(results).to_not include status_tagged_with_cats + end + + it 'private post not returns with account' do + status_tagged_with_cats.update(visibility: :private, searchability: :public) + results = described_class.new(tag_cats, account).get(20) + expect(results).to_not include status_tagged_with_cats + end end end diff --git a/spec/services/fan_out_on_write_service_spec.rb b/spec/services/fan_out_on_write_service_spec.rb index c15253c879..65db23214a 100644 --- a/spec/services/fan_out_on_write_service_spec.rb +++ b/spec/services/fan_out_on_write_service_spec.rb @@ -7,9 +7,10 @@ RSpec.describe FanOutOnWriteService, type: :service do let(:last_active_at) { Time.now.utc } let(:searchability) { 'public' } + let(:dissubscribable) { false } let(:status) { Fabricate(:status, account: alice, visibility: visibility, searchability: searchability, text: 'Hello @bob #hoge') } - let!(:alice) { Fabricate(:user, current_sign_in_at: last_active_at).account } + let!(:alice) { Fabricate(:user, current_sign_in_at: last_active_at, account_attributes: { dissubscribable: dissubscribable }).account } let!(:bob) { Fabricate(:user, current_sign_in_at: last_active_at, account_attributes: { username: 'bob' }).account } let!(:tom) { Fabricate(:user, current_sign_in_at: last_active_at).account } let!(:ohagi) { Fabricate(:user, current_sign_in_at: last_active_at).account } @@ -100,6 +101,14 @@ RSpec.describe FanOutOnWriteService, type: :service do expect(antenna_feed_of(antenna)).to include status.id expect(antenna_feed_of(empty_antenna)).to_not include status.id end + + context 'when dissubscribable is true' do + let(:dissubscribable) { true } + + it 'is not added to the antenna feed' do + expect(antenna_feed_of(antenna)).to_not include status.id + end + end end context 'with STL antenna' do @@ -110,6 +119,14 @@ RSpec.describe FanOutOnWriteService, type: :service do expect(antenna_feed_of(antenna)).to include status.id expect(antenna_feed_of(empty_antenna)).to_not include status.id end + + context 'when dissubscribable is true' do + let(:dissubscribable) { true } + + it 'is added to the antenna feed' do + expect(antenna_feed_of(antenna)).to include status.id + end + end end context 'with LTL antenna' do @@ -120,6 +137,14 @@ RSpec.describe FanOutOnWriteService, type: :service do expect(antenna_feed_of(antenna)).to include status.id expect(antenna_feed_of(empty_antenna)).to_not include status.id end + + context 'when dissubscribable is true' do + let(:dissubscribable) { true } + + it 'is added to the antenna feed' do + expect(antenna_feed_of(antenna)).to include status.id + end + end end end @@ -238,6 +263,89 @@ RSpec.describe FanOutOnWriteService, type: :service do end end + context 'when status is public_unlisted' do + let(:visibility) { 'public_unlisted' } + + it 'is added to the home feed of its author' do + expect(home_feed_of(alice)).to include status.id + end + + it 'is added to the home feed of a follower' do + expect(home_feed_of(bob)).to include status.id + expect(home_feed_of(tom)).to include status.id + end + + it 'is broadcast publicly' do + expect(redis).to have_received(:publish).with('timeline:hashtag:hoge', anything) + expect(redis).to have_received(:publish).with('timeline:public:local', anything) + expect(redis).to_not have_received(:publish).with('timeline:public', anything) + end + + context 'with list' do + let!(:list) { list_with_account(bob, alice) } + let!(:empty_list) { list_with_account(ohagi, bob) } + + it 'is added to the list feed of list follower' do + expect(list_feed_of(list)).to include status.id + expect(list_feed_of(empty_list)).to_not include status.id + end + end + + context 'with antenna' do + let!(:antenna) { antenna_with_account(bob, alice) } + let!(:empty_antenna) { antenna_with_account(tom, bob) } + + it 'is added to the antenna feed of antenna follower' do + expect(antenna_feed_of(antenna)).to include status.id + expect(antenna_feed_of(empty_antenna)).to_not include status.id + end + + context 'when dissubscribable is true' do + let(:dissubscribable) { true } + + it 'is not added to the antenna feed' do + expect(antenna_feed_of(antenna)).to_not include status.id + end + end + end + + context 'with STL antenna' do + let!(:antenna) { antenna_with_options(bob, stl: true) } + let!(:empty_antenna) { antenna_with_options(tom) } + + it 'is added to the antenna feed of antenna follower' do + expect(antenna_feed_of(antenna)).to include status.id + expect(antenna_feed_of(empty_antenna)).to_not include status.id + end + + context 'when dissubscribable is true' do + let(:dissubscribable) { true } + + it 'is added to the antenna feed' do + expect(antenna_feed_of(antenna)).to include status.id + end + end + end + + context 'with LTL antenna' do + let!(:antenna) { antenna_with_options(bob, ltl: true) } + let!(:empty_antenna) { antenna_with_options(tom) } + + it 'is added to the antenna feed of antenna follower' do + expect(antenna_feed_of(antenna)).to include status.id + expect(antenna_feed_of(empty_antenna)).to_not include status.id + end + + context 'when dissubscribable is true' do + let(:dissubscribable) { true } + + it 'is added to the antenna feed' do + expect(antenna_feed_of(antenna)).to include status.id + end + end + end + end + context 'when status is unlisted' do let(:visibility) { 'unlisted' } @@ -255,6 +363,15 @@ RSpec.describe FanOutOnWriteService, type: :service do expect(redis).to_not have_received(:publish).with('timeline:public', anything) end + context 'with searchability private' do + let(:searchability) { 'private' } + + it 'is not broadcast to the hashtag stream' do + expect(redis).to_not have_received(:publish).with('timeline:hashtag:hoge', anything) + expect(redis).to_not have_received(:publish).with('timeline:hashtag:hoge:local', anything) + end + end + context 'with list' do let!(:list) { list_with_account(bob, alice) } let!(:empty_list) { list_with_account(ohagi, bob) } From 22774276e81d1fd6298755c3004a2d371edc91d1 Mon Sep 17 00:00:00 2001 From: KMY Date: Thu, 14 Sep 2023 18:47:58 +0900 Subject: [PATCH 04/15] Remove unsafe params from antenna old edit page --- app/controllers/antennas_controller.rb | 9 +- app/models/antenna.rb | 136 ------------------- app/views/antennas/_antenna_fields.html.haml | 55 +------- 3 files changed, 3 insertions(+), 197 deletions(-) diff --git a/app/controllers/antennas_controller.rb b/app/controllers/antennas_controller.rb index b123d82e9c..5e51e9a68a 100644 --- a/app/controllers/antennas_controller.rb +++ b/app/controllers/antennas_controller.rb @@ -5,7 +5,6 @@ class AntennasController < ApplicationController before_action :authenticate_user! before_action :set_antenna, only: [:edit, :update, :destroy] - before_action :set_lists, only: [:new, :edit] before_action :set_body_classes before_action :set_cache_headers @@ -54,16 +53,12 @@ class AntennasController < ApplicationController @antenna = current_account.antennas.find(params[:id]) end - def set_lists - @lists = current_account.owned_lists - end - def resource_params - params.require(:antenna).permit(:title, :list, :available, :insert_feeds, :stl, :expires_in, :with_media_only, :ignore_reblog, :keywords_raw, :exclude_keywords_raw, :domains_raw, :exclude_domains_raw, :accounts_raw, :exclude_accounts_raw, :tags_raw, :exclude_tags_raw) + params.require(:antenna).permit(:title, :available, :expires_in) end def thin_resource_params - params.require(:antenna).permit(:title, :list) + params.require(:antenna).permit(:title) end def set_body_classes diff --git a/app/models/antenna.rb b/app/models/antenna.rb index c14892e138..a35fa6dd17 100644 --- a/app/models/antenna.rb +++ b/app/models/antenna.rb @@ -92,142 +92,6 @@ class Antenna < ApplicationRecord context end - def list=(list_id) - list_id = list_id.to_i if list_id.is_a?(String) - if list_id.is_a?(Numeric) - self[:list_id] = list_id - else - self[:list] = list_id - end - end - - def keywords_raw - return '' if keywords.blank? - - keywords.join("\n") - end - - def keywords_raw=(raw) - keywords = raw.split(/\R/).filter { |r| r.present? && r.length >= 2 }.uniq - self[:keywords] = keywords - self[:any_keywords] = keywords.none? - end - - def exclude_keywords_raw - return '' if exclude_keywords.blank? - - exclude_keywords.join("\n") - end - - def exclude_keywords_raw=(raw) - exclude_keywords = raw.split(/\R/).filter(&:present?).uniq - self[:exclude_keywords] = exclude_keywords - end - - def tags_raw - antenna_tags.where(exclude: false).map { |tag| tag.tag.name }.join("\n") - end - - def tags_raw=(raw) - return if tags_raw == raw - - tag_names = raw.split(/\R/).filter(&:present?).map { |r| r.start_with?('#') ? r[1..] : r }.uniq - - antenna_tags.where(exclude: false).destroy_all - Tag.find_or_create_by_names(tag_names).each do |tag| - antenna_tags.create!(tag: tag, exclude: false) - end - self[:any_tags] = tag_names.none? - end - - def exclude_tags_raw - return '' if exclude_tags.blank? - - Tag.where(id: exclude_tags).map(&:name).join("\n") - end - - def exclude_tags_raw=(raw) - return if exclude_tags_raw == raw - - tags = [] - tag_names = raw.split(/\R/).filter(&:present?).map { |r| r.start_with?('#') ? r[1..] : r }.uniq - Tag.find_or_create_by_names(tag_names).each do |tag| - tags << tag.id - end - self[:exclude_tags] = tags - end - - def domains_raw - antenna_domains.where(exclude: false).map(&:name).join("\n") - end - - def domains_raw=(raw) - return if domains_raw == raw - - domain_names = raw.split(/\R/).filter(&:present?).uniq - - antenna_domains.where(exclude: false).destroy_all - domain_names.each do |domain| - antenna_domains.create!(name: domain, exclude: false) - end - self[:any_domains] = domain_names.none? - end - - def exclude_domains_raw - return '' if exclude_domains.blank? - - exclude_domains.join("\n") - end - - def exclude_domains_raw=(raw) - return if exclude_domains_raw == raw - - domain_names = raw.split(/\R/).filter(&:present?).uniq - self[:exclude_domains] = domain_names - end - - def accounts_raw - antenna_accounts.where(exclude: false).map(&:account).map { |account| account.domain ? "@#{account.username}@#{account.domain}" : "@#{account.username}" }.join("\n") - end - - def accounts_raw=(raw) - return if accounts_raw == raw - - account_names = raw.split(/\R/).filter(&:present?).map { |r| r.start_with?('@') ? r[1..] : r }.uniq - - hit = false - antenna_accounts.where(exclude: false).destroy_all - account_names.each do |name| - username, domain = name.split('@') - account = Account.find_by(username: username, domain: domain) - if account.present? - antenna_accounts.create!(account: account, exclude: false) - hit = true - end - end - self[:any_accounts] = !hit - end - - def exclude_accounts_raw - return '' if exclude_accounts.blank? - - Account.where(id: exclude_accounts).map { |account| account.domain ? "@#{account.username}@#{account.domain}" : "@#{account.username}" }.join("\n") - end - - def exclude_accounts_raw=(raw) - return if exclude_accounts_raw == raw - - account_names = raw.split(/\R/).filter(&:present?).map { |r| r.start_with?('@') ? r[1..] : r }.uniq - - accounts = [] - account_names.each do |name| - username, domain = name.split('@') - account = Account.find_by(username: username, domain: domain) - accounts << account.id if account.present? - end - self[:exclude_accounts] = accounts - end - private def validate_limit diff --git a/app/views/antennas/_antenna_fields.html.haml b/app/views/antennas/_antenna_fields.html.haml index ac742d9d38..998aa5fdeb 100644 --- a/app/views/antennas/_antenna_fields.html.haml +++ b/app/views/antennas/_antenna_fields.html.haml @@ -8,57 +8,4 @@ = f.input :expires_in, wrapper: :with_label, collection: [30.minutes, 1.hour, 6.hours, 12.hours, 1.day, 1.week].map(&:to_i), label_method: lambda { |i| I18n.t("invites.expires_in.#{i}") }, include_blank: I18n.t('invites.expires_in_prompt') .fields-row - .fields-group.fields-row__column.fields-row__column-6 - = f.input :list, collection: lists, wrapper: :with_label, label_method: lambda { |list| list.title }, label: t('antennas.edit.list'), selected: f.object.list&.id, hint: false, include_blank: '[Insert to Home]' - .fields-group.fields-row__column.fields-row__column-6 - = f.input :available, wrapper: :with_label, label: t('antennas.edit.available'), hint: false - -.fields-row - = f.input :insert_feeds, wrapper: :with_label, label: t('antennas.edit.insert_feeds') -.fields-row - = f.input :stl, wrapper: :with_label, label: t('antennas.edit.stl'), hint: t('antennas.edit.stl_hint') - -%hr.spacer/ -%p.hint= t 'antennas.edit.hint' -%hr.spacer/ - -%h4= t('antennas.contexts.domain') -%p.hint= t 'antennas.edit.domains_hint' - -.fields-row - .fields-row__column.fields-row__column-6.fields-group - = f.input :domains_raw, wrapper: :with_label, as: :text, input_html: { rows: 5 }, label: t('antennas.edit.domains_raw') - .fields-row__column.fields-row__column-6.fields-group - = f.input :exclude_domains_raw, wrapper: :with_label, as: :text, input_html: { rows: 5 }, label: t('antennas.edit.exclude_domains_raw') - -%h4= t('antennas.contexts.account') -%p.hint= t 'antennas.edit.accounts_hint' - -.fields-row - .fields-row__column.fields-row__column-6.fields-group - = f.input :accounts_raw, wrapper: :with_label, as: :text, input_html: { rows: 5 }, label: t('antennas.edit.accounts_raw') - .fields-row__column.fields-row__column-6.fields-group - = f.input :exclude_accounts_raw, wrapper: :with_label, as: :text, input_html: { rows: 5 }, label: t('antennas.edit.exclude_accounts_raw') - -%h4= t('antennas.contexts.tag') - -.fields-row - .fields-row__column.fields-row__column-6.fields-group - = f.input :tags_raw, wrapper: :with_label, as: :text, input_html: { rows: 5 }, label: t('antennas.edit.tags_raw') - .fields-row__column.fields-row__column-6.fields-group - = f.input :exclude_tags_raw, wrapper: :with_label, as: :text, input_html: { rows: 5 }, label: t('antennas.edit.exclude_tags_raw') - -%h4= t('antennas.contexts.keyword') -%p.hint= t 'antennas.edit.keywords_hint' - -.fields-row - .fields-row__column.fields-row__column-6.fields-group - = f.input :keywords_raw, wrapper: :with_label, as: :text, input_html: { rows: 5 }, label: t('antennas.edit.keywords_raw') - .fields-row__column.fields-row__column-6.fields-group - = f.input :exclude_keywords_raw, wrapper: :with_label, as: :text, input_html: { rows: 5 }, label: t('antennas.edit.exclude_keywords_raw') - -%hr.spacer/ -.fields-group - = f.input :with_media_only, wrapper: :with_label, label: t('antennas.edit.with_media_only'), hint: false -.fields-group - = f.input :ignore_reblog, wrapper: :with_label, label: t('antennas.edit.ignore_reblog'), hint: false + = f.input :available, wrapper: :with_label, label: t('antennas.edit.available'), hint: false From 1de5ee1deb773b8c894ca616ed7f64da97268028 Mon Sep 17 00:00:00 2001 From: KMY Date: Thu, 14 Sep 2023 18:48:54 +0900 Subject: [PATCH 05/15] Bump version to 4.0 --- lib/mastodon/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/mastodon/version.rb b/lib/mastodon/version.rb index c00ed740a2..92179d9b8f 100644 --- a/lib/mastodon/version.rb +++ b/lib/mastodon/version.rb @@ -5,7 +5,7 @@ module Mastodon module_function def kmyblue_major - 3 + 4 end def kmyblue_minor From 1f6047a43fe6ed0d0876d1f1740c1f215d8d9f1d Mon Sep 17 00:00:00 2001 From: KMY Date: Thu, 14 Sep 2023 19:13:17 +0900 Subject: [PATCH 06/15] Add expiration/limited/reference icon on timeline --- app/javascript/mastodon/components/status.jsx | 7 +++++++ app/serializers/rest/status_serializer.rb | 9 +++++++++ 2 files changed, 16 insertions(+) diff --git a/app/javascript/mastodon/components/status.jsx b/app/javascript/mastodon/components/status.jsx index 257e90d1c1..0f18e4be9e 100644 --- a/app/javascript/mastodon/components/status.jsx +++ b/app/javascript/mastodon/components/status.jsx @@ -585,6 +585,10 @@ class Status extends ImmutablePureComponent { const {statusContentProps, hashtagBar} = getHashtagBarForStatus(status); const expanded = !status.get('hidden') + const withLimited = status.get('visibility_ex') === 'limited' && status.get('limited_scope') ? : null; + const withReference = status.get('status_references_count') > 0 ? : null; + const withExpiration = status.get('expires_at') ? : null; + return (
@@ -596,6 +600,9 @@ class Status extends ImmutablePureComponent { {/* eslint-disable-next-line jsx-a11y/no-static-element-interactions */}
+ {withReference} + {withExpiration} + {withLimited} {status.get('edited_at') && *} diff --git a/app/serializers/rest/status_serializer.rb b/app/serializers/rest/status_serializer.rb index e53fb535bc..9919b831cb 100644 --- a/app/serializers/rest/status_serializer.rb +++ b/app/serializers/rest/status_serializer.rb @@ -15,6 +15,7 @@ class REST::StatusSerializer < ActiveModel::Serializer attribute :bookmarked, if: :current_user? attribute :pinned, if: :pinnable? attribute :reactions, if: :reactions? + attribute :expires_at, if: :will_expire? has_many :filtered, serializer: REST::FilterResultSerializer, if: :current_user? attribute :content, unless: :source_requested? @@ -205,6 +206,14 @@ class REST::StatusSerializer < ActiveModel::Serializer object.active_mentions.to_a.sort_by(&:id) end + def will_expire? + object.scheduled_expiration_status.present? + end + + def expires_at + object.scheduled_expiration_status.scheduled_at + end + private def relationships From dc6af577a2bf7cf8e8985cb0a1f65e7ebac3e1c8 Mon Sep 17 00:00:00 2001 From: KMY Date: Thu, 14 Sep 2023 19:33:57 +0900 Subject: [PATCH 07/15] Fix test --- spec/services/delivery_antenna_service_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/services/delivery_antenna_service_spec.rb b/spec/services/delivery_antenna_service_spec.rb index aa63aed74c..26c23eb930 100644 --- a/spec/services/delivery_antenna_service_spec.rb +++ b/spec/services/delivery_antenna_service_spec.rb @@ -266,8 +266,8 @@ RSpec.describe DeliveryAntennaService, type: :service do end context 'when multiple antennas insert list with keyword' do - let!(:antenna) { antenna_with_keyword(bob, 'body', insert_feeds: true, list: list(bob).id) } - let!(:empty_antenna) { antenna_with_keyword(tom, 'body', insert_feeds: true, list: list(tom).id) } + let!(:antenna) { antenna_with_keyword(bob, 'body', insert_feeds: true, list: list(bob)) } + let!(:empty_antenna) { antenna_with_keyword(tom, 'body', insert_feeds: true, list: list(tom)) } it 'detecting antenna' do expect(antenna_feed_of(antenna)).to include status.id From 87a148a6add0c1c84b57e5da3482f730af0fef75 Mon Sep 17 00:00:00 2001 From: KMY Date: Thu, 14 Sep 2023 21:40:03 +0900 Subject: [PATCH 08/15] Improve N+1 problem on timeline statuses (except for emoji_reaction N+1) --- app/models/status.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/models/status.rb b/app/models/status.rb index c6c05e95e7..d679bde788 100644 --- a/app/models/status.rb +++ b/app/models/status.rb @@ -173,6 +173,8 @@ class Status < ApplicationRecord :tags, :preview_cards, :preloadable_poll, + :reference_objects, + :scheduled_expiration_status, account: [:account_stat, user: :role], active_mentions: { account: :account_stat }, reblog: [ @@ -183,6 +185,8 @@ class Status < ApplicationRecord :conversation, :status_stat, :preloadable_poll, + :reference_objects, + :scheduled_expiration_status, account: [:account_stat, user: :role], active_mentions: { account: :account_stat }, ], From 71729f86f9cabab7cceacc80f96ea323cec9be6b Mon Sep 17 00:00:00 2001 From: KMY Date: Thu, 14 Sep 2023 21:40:03 +0900 Subject: [PATCH 09/15] Improve N+1 problem on timeline statuses (except for emoji_reaction N+1) --- app/models/status.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/models/status.rb b/app/models/status.rb index c6c05e95e7..d679bde788 100644 --- a/app/models/status.rb +++ b/app/models/status.rb @@ -173,6 +173,8 @@ class Status < ApplicationRecord :tags, :preview_cards, :preloadable_poll, + :reference_objects, + :scheduled_expiration_status, account: [:account_stat, user: :role], active_mentions: { account: :account_stat }, reblog: [ @@ -183,6 +185,8 @@ class Status < ApplicationRecord :conversation, :status_stat, :preloadable_poll, + :reference_objects, + :scheduled_expiration_status, account: [:account_stat, user: :role], active_mentions: { account: :account_stat }, ], From 1fbbac76f604cc95dfd3e20c42d442a21c77b4b6 Mon Sep 17 00:00:00 2001 From: KMY Date: Thu, 14 Sep 2023 21:41:53 +0900 Subject: [PATCH 10/15] Bump version to 3.1 --- lib/mastodon/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/mastodon/version.rb b/lib/mastodon/version.rb index c00ed740a2..fbe320776e 100644 --- a/lib/mastodon/version.rb +++ b/lib/mastodon/version.rb @@ -9,7 +9,7 @@ module Mastodon end def kmyblue_minor - 0 + 1 end def major From 2f57815fb098dcb8036df4e3a2a4c093dc53016d Mon Sep 17 00:00:00 2001 From: KMY Date: Fri, 15 Sep 2023 08:09:34 +0900 Subject: [PATCH 11/15] Remove status cache when status reference set --- app/models/status_reference.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/models/status_reference.rb b/app/models/status_reference.rb index 2ed5b2aee9..62be6df3b1 100644 --- a/app/models/status_reference.rb +++ b/app/models/status_reference.rb @@ -18,8 +18,16 @@ class StatusReference < ApplicationRecord has_one :notification, as: :activity, dependent: :destroy validate :validate_status_visibilities + after_commit :reset_parent_cache + + private def validate_status_visibilities raise Mastodon::ValidationError, I18n.t('status_references.errors.invalid_status_visibilities') if [:public, :public_unlisted, :unlisted, :login].exclude?(target_status.visibility.to_sym) end + + def reset_parent_cache + Rails.cache.delete("statuses/#{status_id}") + Rails.cache.delete("statuses/#{target_status_id}") + end end From cf96e7eb39444ddb4b469b1cebce73ce3c8f1480 Mon Sep 17 00:00:00 2001 From: KMY Date: Fri, 15 Sep 2023 08:17:13 +0900 Subject: [PATCH 12/15] Set status references maximium value --- app/services/process_references_service.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/services/process_references_service.rb b/app/services/process_references_service.rb index 0dbdc43560..9c8b3813f5 100644 --- a/app/services/process_references_service.rb +++ b/app/services/process_references_service.rb @@ -5,13 +5,14 @@ class ProcessReferencesService < BaseService DOMAIN = ENV['WEB_DOMAIN'] || ENV.fetch('LOCAL_DOMAIN', nil) REFURL_EXP = /(RT|QT|BT|RN|RE)((:|;)?\s+|:|;)(#{URI::DEFAULT_PARSER.make_regexp(%w(http https))})/ + MAX_REFERENCES = 5 def call(status, reference_parameters, urls: nil) @status = status @reference_parameters = reference_parameters || [] @urls = urls || [] - old_references + @references_count = old_references.size return unless added_references.size.positive? || removed_references.size.positive? @@ -63,6 +64,9 @@ class ProcessReferencesService < BaseService statuses.each do |status| @added_objects << @status.reference_objects.new(target_status: status) status.increment_count!(:status_referred_by_count) + @references_count += 1 + + break if @references_count >= MAX_REFERENCES end end @@ -85,6 +89,7 @@ class ProcessReferencesService < BaseService @status.reference_objects.where(target_status: statuses).destroy_all statuses.each do |status| status.decrement_count!(:status_referred_by_count) + @references_count -= 1 end end end From 7c387becb61e02798de55429c98729249c2c4a32 Mon Sep 17 00:00:00 2001 From: KMY Date: Fri, 15 Sep 2023 08:19:58 +0900 Subject: [PATCH 13/15] Remove some error of fetch_instance_info_worker --- app/workers/activitypub/fetch_instance_info_worker.rb | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/app/workers/activitypub/fetch_instance_info_worker.rb b/app/workers/activitypub/fetch_instance_info_worker.rb index faf7401fc9..57cbd97d10 100644 --- a/app/workers/activitypub/fetch_instance_info_worker.rb +++ b/app/workers/activitypub/fetch_instance_info_worker.rb @@ -9,7 +9,6 @@ class ActivityPub::FetchInstanceInfoWorker sidekiq_options queue: 'push', retry: 2 class Error < StandardError; end - class GoneError < Error; end class RequestError < Error; end class DeadError < Error; end @@ -68,9 +67,7 @@ class ActivityPub::FetchInstanceInfoWorker raise Mastodon::UnexpectedResponseError, response unless response_successful?(response) || response_error_unsalvageable?(response) body_to_json(response.body_with_limit) - elsif response.code == 410 - raise ActivityPub::FetchInstanceInfoWorker::GoneError, "#{@instance.domain} is gone from the server" - elsif response.code == 404 + elsif [400, 401, 403, 404, 410].include?(response.code) raise ActivityPub::FetchInstanceInfoWorker::DeadError, "Request for #{@instance.domain} returned HTTP #{response.code}" else raise ActivityPub::FetchInstanceInfoWorker::RequestError, "Request for #{@instance.domain} returned HTTP #{response.code}" From c0ff0754a3e23c90c50525593dcc9d34c2d0ad97 Mon Sep 17 00:00:00 2001 From: KMY Date: Fri, 15 Sep 2023 09:31:12 +0900 Subject: [PATCH 14/15] Fix timeline emoji_reactions N+1 problem --- .../api/v1/accounts/statuses_controller.rb | 4 ++- .../api/v1/bookmarks_controller.rb | 4 ++- .../api/v1/emoji_reactions_controller.rb | 4 ++- .../api/v1/favourites_controller.rb | 4 ++- .../referred_by_statuses_controller.rb | 4 ++- .../api/v1/timelines/home_controller.rb | 2 ++ .../api/v1/timelines/public_controller.rb | 4 ++- .../api/v1/timelines/tag_controller.rb | 4 ++- app/models/status.rb | 26 ++++++++++++++----- .../emoji_reaction_accounts_presenter.rb | 22 ++++++++++++++++ .../status_relationships_presenter.rb | 4 ++- app/serializers/rest/status_serializer.rb | 18 +++++++++++-- 12 files changed, 84 insertions(+), 16 deletions(-) create mode 100644 app/presenters/emoji_reaction_accounts_presenter.rb diff --git a/app/controllers/api/v1/accounts/statuses_controller.rb b/app/controllers/api/v1/accounts/statuses_controller.rb index 51f541bd23..7004dbb530 100644 --- a/app/controllers/api/v1/accounts/statuses_controller.rb +++ b/app/controllers/api/v1/accounts/statuses_controller.rb @@ -9,7 +9,9 @@ class Api::V1::Accounts::StatusesController < Api::BaseController def index cache_if_unauthenticated! @statuses = load_statuses - render json: @statuses, each_serializer: REST::StatusSerializer, relationships: StatusRelationshipsPresenter.new(@statuses, current_user&.account_id) + render json: @statuses, each_serializer: REST::StatusSerializer, + relationships: StatusRelationshipsPresenter.new(@statuses, current_user&.account_id), + emoji_reaction_permitted_account_ids: EmojiReactionAccountsPresenter.new(@statuses, current_user&.account_id) end private diff --git a/app/controllers/api/v1/bookmarks_controller.rb b/app/controllers/api/v1/bookmarks_controller.rb index 498eb16f44..0985366964 100644 --- a/app/controllers/api/v1/bookmarks_controller.rb +++ b/app/controllers/api/v1/bookmarks_controller.rb @@ -7,7 +7,9 @@ class Api::V1::BookmarksController < Api::BaseController def index @statuses = load_statuses - render json: @statuses, each_serializer: REST::StatusSerializer, relationships: StatusRelationshipsPresenter.new(@statuses, current_user&.account_id) + render json: @statuses, each_serializer: REST::StatusSerializer, + relationships: StatusRelationshipsPresenter.new(@statuses, current_user&.account_id), + emoji_reaction_permitted_account_ids: EmojiReactionAccountsPresenter.new(@statuses, current_user&.account_id) end private diff --git a/app/controllers/api/v1/emoji_reactions_controller.rb b/app/controllers/api/v1/emoji_reactions_controller.rb index db32962266..43b39921db 100644 --- a/app/controllers/api/v1/emoji_reactions_controller.rb +++ b/app/controllers/api/v1/emoji_reactions_controller.rb @@ -7,7 +7,9 @@ class Api::V1::EmojiReactionsController < Api::BaseController def index @statuses = load_statuses - render json: @statuses, each_serializer: REST::StatusSerializer, relationships: StatusRelationshipsPresenter.new(@statuses, current_user&.account_id) + render json: @statuses, each_serializer: REST::StatusSerializer, + relationships: StatusRelationshipsPresenter.new(@statuses, current_user&.account_id), + emoji_reaction_permitted_account_ids: EmojiReactionAccountsPresenter.new(@statuses, current_user&.account_id) end private diff --git a/app/controllers/api/v1/favourites_controller.rb b/app/controllers/api/v1/favourites_controller.rb index faf1bda96a..984f3d3051 100644 --- a/app/controllers/api/v1/favourites_controller.rb +++ b/app/controllers/api/v1/favourites_controller.rb @@ -7,7 +7,9 @@ class Api::V1::FavouritesController < Api::BaseController def index @statuses = load_statuses - render json: @statuses, each_serializer: REST::StatusSerializer, relationships: StatusRelationshipsPresenter.new(@statuses, current_user&.account_id) + render json: @statuses, each_serializer: REST::StatusSerializer, + relationships: StatusRelationshipsPresenter.new(@statuses, current_user&.account_id), + emoji_reaction_permitted_account_ids: EmojiReactionAccountsPresenter.new(@statuses, current_user&.account_id) end private diff --git a/app/controllers/api/v1/statuses/referred_by_statuses_controller.rb b/app/controllers/api/v1/statuses/referred_by_statuses_controller.rb index 70f04df209..b0ad6754ea 100644 --- a/app/controllers/api/v1/statuses/referred_by_statuses_controller.rb +++ b/app/controllers/api/v1/statuses/referred_by_statuses_controller.rb @@ -9,7 +9,9 @@ class Api::V1::Statuses::ReferredByStatusesController < Api::BaseController def index @statuses = load_statuses - render json: @statuses, each_serializer: REST::StatusSerializer, relationships: StatusRelationshipsPresenter.new(@statuses, current_user&.account_id) + render json: @statuses, each_serializer: REST::StatusSerializer, + relationships: StatusRelationshipsPresenter.new(@statuses, current_user&.account_id), + emoji_reaction_permitted_account_ids: EmojiReactionAccountsPresenter.new(@statuses, current_user&.account_id) end private diff --git a/app/controllers/api/v1/timelines/home_controller.rb b/app/controllers/api/v1/timelines/home_controller.rb index 83b8cb4c66..b7c78e8734 100644 --- a/app/controllers/api/v1/timelines/home_controller.rb +++ b/app/controllers/api/v1/timelines/home_controller.rb @@ -9,11 +9,13 @@ class Api::V1::Timelines::HomeController < Api::BaseController with_read_replica do @statuses = load_statuses @relationships = StatusRelationshipsPresenter.new(@statuses, current_user&.account_id) + @emoji_reactions = EmojiReactionAccountsPresenter.new(@statuses, current_user&.account_id) end render json: @statuses, each_serializer: REST::StatusSerializer, relationships: @relationships, + emoji_reaction_permitted_account_ids: @emoji_reactions, status: account_home_feed.regenerating? ? 206 : 200 end diff --git a/app/controllers/api/v1/timelines/public_controller.rb b/app/controllers/api/v1/timelines/public_controller.rb index 5bbd92b9ee..9c320e688e 100644 --- a/app/controllers/api/v1/timelines/public_controller.rb +++ b/app/controllers/api/v1/timelines/public_controller.rb @@ -7,7 +7,9 @@ class Api::V1::Timelines::PublicController < Api::BaseController def show cache_if_unauthenticated! @statuses = load_statuses - render json: @statuses, each_serializer: REST::StatusSerializer, relationships: StatusRelationshipsPresenter.new(@statuses, current_user&.account_id) + render json: @statuses, each_serializer: REST::StatusSerializer, + relationships: StatusRelationshipsPresenter.new(@statuses, current_user&.account_id), + emoji_reaction_permitted_account_ids: EmojiReactionAccountsPresenter.new(@statuses, current_user&.account_id) end private diff --git a/app/controllers/api/v1/timelines/tag_controller.rb b/app/controllers/api/v1/timelines/tag_controller.rb index a79d65c124..1de00f50c8 100644 --- a/app/controllers/api/v1/timelines/tag_controller.rb +++ b/app/controllers/api/v1/timelines/tag_controller.rb @@ -8,7 +8,9 @@ class Api::V1::Timelines::TagController < Api::BaseController def show cache_if_unauthenticated! @statuses = load_statuses - render json: @statuses, each_serializer: REST::StatusSerializer, relationships: StatusRelationshipsPresenter.new(@statuses, current_user&.account_id) + render json: @statuses, each_serializer: REST::StatusSerializer, + relationships: StatusRelationshipsPresenter.new(@statuses, current_user&.account_id), + emoji_reaction_permitted_account_ids: EmojiReactionAccountsPresenter.new(@statuses, current_user&.account_id) end private diff --git a/app/models/status.rb b/app/models/status.rb index d679bde788..d4a28220d1 100644 --- a/app/models/status.rb +++ b/app/models/status.rb @@ -357,21 +357,30 @@ class Status < ApplicationRecord return [] if account.present? && !self.account.show_emoji_reaction?(account) return [] if account.nil? && !options[:force] && self.account.emoji_reaction_policy != :allow + permitted_account_ids = options[:permitted_account_ids] + (Oj.load(status_stat&.emoji_reactions || '', mode: :strict) || []).tap do |emoji_reactions| if account.present? - remove_emoji_reactions = [] + public_emoji_reactions = [] + emoji_reactions.each do |emoji_reaction| emoji_reaction['me'] = emoji_reaction['account_ids'].include?(account.id.to_s) emoji_reaction['account_ids'] -= account.excluded_from_timeline_account_ids.map(&:to_s) - accounts = Account.where(id: emoji_reaction['account_ids'], silenced_at: nil, suspended_at: nil) - accounts = accounts.where('domain IS NULL OR domain NOT IN (?)', account.excluded_from_timeline_domains) if account.excluded_from_timeline_domains.size.positive? - emoji_reaction['account_ids'] = accounts.pluck(:id).map(&:to_s) + accounts = [] + if permitted_account_ids + emoji_reaction['account_ids'] = emoji_reaction['account_ids'] & permitted_account_ids.map(&:to_s) + else + accounts = Account.where(id: emoji_reaction['account_ids'], silenced_at: nil, suspended_at: nil) + accounts = accounts.where('domain IS NULL OR domain NOT IN (?)', account.excluded_from_timeline_domains) if account.excluded_from_timeline_domains.size.positive? + emoji_reaction['account_ids'] = accounts.pluck(:id).map(&:to_s) + end emoji_reaction['count'] = emoji_reaction['account_ids'].size - remove_emoji_reactions << emoji_reaction if emoji_reaction['count'] <= 0 + public_emoji_reactions << emoji_reaction if (emoji_reaction['count']).positive? end - emoji_reactions - remove_emoji_reactions + + public_emoji_reactions end end end @@ -463,6 +472,11 @@ class Status < ApplicationRecord EmojiReaction.select('status_id').where(status_id: status_ids).where(account_id: account_id).each_with_object({}) { |e, h| h[e.status_id] = true } end + def emoji_reaction_allows_map(status_ids, account_id) + my_account = Account.find_by(id: account_id) + Status.where(id: status_ids).pluck(:account_id).uniq.index_with { |a| Account.find_by(id: a).show_emoji_reaction?(my_account) } + end + def reload_stale_associations!(cached_items) account_ids = [] diff --git a/app/presenters/emoji_reaction_accounts_presenter.rb b/app/presenters/emoji_reaction_accounts_presenter.rb new file mode 100644 index 0000000000..1b683f3366 --- /dev/null +++ b/app/presenters/emoji_reaction_accounts_presenter.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true + +class EmojiReactionAccountsPresenter + attr_reader :permitted_account_ids + + def initialize(statuses, current_account_id = nil, **_options) + @current_account_id = current_account_id + + statuses = statuses.compact + status_ids = statuses.flat_map { |s| [s.id, s.reblog_of_id] }.uniq.compact + emoji_reactions = EmojiReaction.where(status_id: status_ids) + account_ids = emoji_reactions.pluck(:account_id).uniq + + permitted_accounts = Account.where(id: account_ids, silenced_at: nil, suspended_at: nil) + if current_account_id.present? + account = Account.find(current_account_id) + permitted_accounts = permitted_accounts.where('domain IS NULL OR domain NOT IN (?)', account.excluded_from_timeline_domains) if account.present? && account.excluded_from_timeline_domains.size.positive? + end + + @permitted_account_ids = permitted_accounts.pluck(:id) + end +end diff --git a/app/presenters/status_relationships_presenter.rb b/app/presenters/status_relationships_presenter.rb index 3a5f0e1589..9e55742403 100644 --- a/app/presenters/status_relationships_presenter.rb +++ b/app/presenters/status_relationships_presenter.rb @@ -4,7 +4,7 @@ class StatusRelationshipsPresenter PINNABLE_VISIBILITIES = %w(public public_unlisted unlisted login private).freeze attr_reader :reblogs_map, :favourites_map, :mutes_map, :pins_map, - :bookmarks_map, :filters_map, :emoji_reactions_map, :attributes_map + :bookmarks_map, :filters_map, :emoji_reactions_map, :attributes_map, :emoji_reaction_allows_map def initialize(statuses, current_account_id = nil, **options) @current_account_id = current_account_id @@ -17,6 +17,7 @@ class StatusRelationshipsPresenter @pins_map = {} @filters_map = {} @emoji_reactions_map = {} + @emoji_reaction_allows_map = nil else statuses = statuses.compact status_ids = statuses.flat_map { |s| [s.id, s.reblog_of_id] }.uniq.compact @@ -30,6 +31,7 @@ class StatusRelationshipsPresenter @mutes_map = Status.mutes_map(conversation_ids, current_account_id).merge(options[:mutes_map] || {}) @pins_map = Status.pins_map(pinnable_status_ids, current_account_id).merge(options[:pins_map] || {}) @emoji_reactions_map = Status.emoji_reactions_map(status_ids, current_account_id).merge(options[:emoji_reactions_map] || {}) + @emoji_reaction_allows_map = Status.emoji_reaction_allows_map(status_ids, current_account_id).merge(options[:emoji_reaction_allows_map] || {}) @attributes_map = options[:attributes_map] || {} end end diff --git a/app/serializers/rest/status_serializer.rb b/app/serializers/rest/status_serializer.rb index e53fb535bc..68b3485169 100644 --- a/app/serializers/rest/status_serializer.rb +++ b/app/serializers/rest/status_serializer.rb @@ -122,7 +122,7 @@ class REST::StatusSerializer < ActiveModel::Serializer end def emoji_reactions - object.emoji_reactions_grouped_by_name(current_user&.account) + show_emoji_reaction? ? object.emoji_reactions_grouped_by_name(current_user&.account, permitted_account_ids: emoji_reaction_permitted_account_ids) : [] end def emoji_reactions_count @@ -131,7 +131,17 @@ class REST::StatusSerializer < ActiveModel::Serializer object.account.emoji_reaction_policy == :allow ? object.emoji_reactions_count : 0 else - object.account.show_emoji_reaction?(current_user.account) ? object.emoji_reactions_count : 0 + show_emoji_reaction? ? object.emoji_reactions_count : 0 + end + end + + def show_emoji_reaction? + if relationships + return true if relationships.emoji_reaction_allows_map.nil? + + relationships.emoji_reaction_allows_map[object.account_id] || false + else + object.account.show_emoji_reaction?(current_user.account) end end @@ -211,6 +221,10 @@ class REST::StatusSerializer < ActiveModel::Serializer instance_options && instance_options[:relationships] end + def emoji_reaction_permitted_account_ids + current_user.present? && instance_options && instance_options[:emoji_reaction_permitted_account_ids]&.permitted_account_ids + end + class ApplicationSerializer < ActiveModel::Serializer attributes :name, :website From 8540774f8f5bde0a64bd7ee8774fb2a65e868eb7 Mon Sep 17 00:00:00 2001 From: KMY Date: Fri, 15 Sep 2023 09:43:34 +0900 Subject: [PATCH 15/15] Reser minour version --- lib/mastodon/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/mastodon/version.rb b/lib/mastodon/version.rb index a0584ee1f5..92179d9b8f 100644 --- a/lib/mastodon/version.rb +++ b/lib/mastodon/version.rb @@ -9,7 +9,7 @@ module Mastodon end def kmyblue_minor - 1 + 0 end def major