Merge branch 'next' into 'develop'
Next Closes #895 and #880 See merge request soapbox-pub/soapbox-fe!1122
This commit is contained in:
commit
37b0fb3d51
903 changed files with 27588 additions and 5386 deletions
BIN
.eslintrc.js
BIN
.eslintrc.js
Binary file not shown.
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -2,6 +2,7 @@
|
|||
/tmp/
|
||||
/build/
|
||||
/coverage/
|
||||
/.coverage/
|
||||
/.eslintcache
|
||||
/.env
|
||||
/deploy.sh
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
image: node:14
|
||||
image: node:16
|
||||
|
||||
variables:
|
||||
NODE_ENV: test
|
||||
|
@ -22,7 +22,7 @@ before_script:
|
|||
|
||||
lint-js:
|
||||
stage: lint
|
||||
script: yarn test:lint:js
|
||||
script: yarn lint:js
|
||||
only:
|
||||
changes:
|
||||
- "**/*.js"
|
||||
|
@ -34,7 +34,7 @@ lint-js:
|
|||
|
||||
lint-sass:
|
||||
stage: lint
|
||||
script: yarn test:lint:sass
|
||||
script: yarn lint:sass
|
||||
only:
|
||||
changes:
|
||||
- "**/*.scss"
|
||||
|
@ -43,7 +43,7 @@ lint-sass:
|
|||
|
||||
jest:
|
||||
stage: test
|
||||
script: yarn test:jest
|
||||
script: yarn test:coverage
|
||||
only:
|
||||
changes:
|
||||
- "**/*.js"
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
"font-family-no-missing-generic-family-keyword": [true, { "ignoreFontFamilies": ["ForkAwesome", "Font Awesome 5 Free", "OpenDyslexic", "soapbox"] }],
|
||||
"no-descending-specificity": null,
|
||||
"no-duplicate-selectors": null,
|
||||
"scss/at-rule-no-unknown": [true, { "ignoreAtRules": ["/tailwind/"]}]
|
||||
"scss/at-rule-no-unknown": [true, { "ignoreAtRules": ["/tailwind/", "layer"]}],
|
||||
"no-invalid-position-at-import-rule": null
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
nodejs 14.17.6
|
||||
nodejs 16.14.2
|
||||
|
|
10
README.md
10
README.md
|
@ -153,15 +153,15 @@ NODE_ENV=development
|
|||
- `yarn manage:translations` - Normalizes translation files. Should always be run after editing i18n strings.
|
||||
|
||||
#### Tests
|
||||
- `yarn test` - Runs all tests.
|
||||
- `yarn test:all` - Runs all tests and linters.
|
||||
|
||||
- `yarn test:lint` - Runs all linter tests.
|
||||
- `yarn test` - Runs Jest for frontend unit tests.
|
||||
|
||||
- `yarn test:lint:js` - Runs only JavaScript linter.
|
||||
- `yarn lint` - Runs all linters.
|
||||
|
||||
- `yarn test:lint:sass` - Runs only SASS linter.
|
||||
- `yarn lint:js` - Runs only JavaScript linter.
|
||||
|
||||
- `yarn test:jest` - Frontend unit tests.
|
||||
- `yarn lint:sass` - Runs only SASS linter.
|
||||
|
||||
# Contributing
|
||||
|
||||
|
|
Binary file not shown.
1
app/icons/alert.svg
Normal file
1
app/icons/alert.svg
Normal file
|
@ -0,0 +1 @@
|
|||
<svg viewBox="0 0 24 24" stroke="currentColor" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M19 14v6a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2h6M19 9a4 4 0 1 0 0-8 4 4 0 0 0 0 8Z" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>
|
After Width: | Height: | Size: 267 B |
1
app/icons/cog.svg
Normal file
1
app/icons/cog.svg
Normal file
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 0 0-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 0 0-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 0 0-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 0 0-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 0 0 1.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"/><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0z"/></svg>
|
After Width: | Height: | Size: 781 B |
1
app/icons/compose.svg
Normal file
1
app/icons/compose.svg
Normal file
|
@ -0,0 +1 @@
|
|||
<svg fill="white" stroke="none" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M8.21 4.175V5.86h1.685a.842.842 0 0 1 0 1.684H8.21v1.684a.842.842 0 1 1-1.685 0V7.544H4.842a.842.842 0 1 1 0-1.684h1.684V4.175a.842.842 0 1 1 1.685 0Zm12.87 3.523a.814.814 0 0 1 0 1.18l-1.43 1.6-3.2-3.2 1.515-1.517a.814.814 0 0 1 1.179 0l1.937 1.937ZM6.573 18.364a5 5 0 0 1 1.392-2.686l7.559-7.559 3.116 3.2-7.47 7.544a5 5 0 0 1-2.704 1.409l-2.29.395.397-2.303Z"/></svg>
|
After Width: | Height: | Size: 487 B |
1
app/icons/feed.svg
Normal file
1
app/icons/feed.svg
Normal file
|
@ -0,0 +1 @@
|
|||
<svg viewBox="0 0 24 24" stroke="currentColor" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M22 3H2a1 1 0 0 0-1 1v4a1 1 0 0 0 1 1h20a1 1 0 0 0 1-1V4a1 1 0 0 0-1-1ZM1 15h22M1 21h22" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>
|
After Width: | Height: | Size: 264 B |
1
app/icons/mail.svg
Normal file
1
app/icons/mail.svg
Normal file
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m3 8 7.89 5.26a2 2 0 0 0 2.22 0L21 8M5 19h14a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2z"/></svg>
|
After Width: | Height: | Size: 284 B |
1
app/icons/user.svg
Normal file
1
app/icons/user.svg
Normal file
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M16 7a4 4 0 1 1-8 0 4 4 0 0 1 8 0zm-4 7a7 7 0 0 0-7 7h14a7 7 0 0 0-7-7z"/></svg>
|
After Width: | Height: | Size: 247 B |
|
@ -5,15 +5,19 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover, user-scalable=no">
|
||||
<meta name="mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="referrer" content="same-origin" />
|
||||
<link href="/manifest.json" rel="manifest">
|
||||
<!--server-generated-meta-->
|
||||
<link rel="icon" type="image/png" href="/favicon.png">
|
||||
<%= snippets %>
|
||||
</head>
|
||||
<body class="app-body app-body--loading theme-mode-light no-reduce-motion">
|
||||
<div class="app-holder" id="soapbox">
|
||||
<div class="loading-indicator">
|
||||
<div class="loading-indicator__container">
|
||||
<div class="loading-indicator__figure"></div>
|
||||
<body class="theme-mode-light no-reduce-motion">
|
||||
<div id="soapbox">
|
||||
<div class="loading-indicator-wrapper">
|
||||
<div class="loading-indicator">
|
||||
<div class="loading-indicator__container">
|
||||
<div class="loading-indicator__figure"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -52,11 +52,11 @@
|
|||
"audio.play": "Play",
|
||||
"audio.unmute": "Unmute",
|
||||
"boost_modal.combo": "You can press {combo} to skip this next time",
|
||||
"bundle_column_error.body": "Something went wrong while loading this component.",
|
||||
"bundle_column_error.body": "Something went wrong while loading this page.",
|
||||
"bundle_column_error.retry": "Try again",
|
||||
"bundle_column_error.title": "Network error",
|
||||
"bundle_modal_error.close": "Close",
|
||||
"bundle_modal_error.message": "Something went wrong while loading this component.",
|
||||
"bundle_modal_error.message": "Something went wrong while loading this page.",
|
||||
"bundle_modal_error.retry": "Try again",
|
||||
"column.blocks": "Blocked users",
|
||||
"column.community": "Local timeline",
|
||||
|
@ -69,7 +69,7 @@
|
|||
"column.home": "Home",
|
||||
"column.lists": "Lists",
|
||||
"column.mutes": "Muted users",
|
||||
"column.notifications": "Notifications",
|
||||
"column.notifications": "Alerts",
|
||||
"column.preferences": "Preferences",
|
||||
"column.public": "Federated timeline",
|
||||
"column.security": "Security",
|
||||
|
@ -254,7 +254,7 @@
|
|||
"login.fields.username_placeholder": "Username",
|
||||
"login.log_in": "Log in",
|
||||
"login.reset_password_hint": "Trouble logging in?",
|
||||
"media_gallery.toggle_visible": "Toggle visibility",
|
||||
"media_gallery.toggle_visible": "Hide",
|
||||
"missing_indicator.label": "Not found",
|
||||
"missing_indicator.sublabel": "This resource could not be found",
|
||||
"morefollows.followers_label": "…and {count} more {count, plural, one {follower} other {followers}} on remote sites.",
|
||||
|
@ -445,7 +445,7 @@
|
|||
"tabs_bar.apps": "Apps",
|
||||
"tabs_bar.home": "Home",
|
||||
"tabs_bar.news": "News",
|
||||
"tabs_bar.notifications": "Notifications",
|
||||
"tabs_bar.notifications": "Alerts",
|
||||
"tabs_bar.post": "Post",
|
||||
"tabs_bar.search": "Search",
|
||||
"time_remaining.days": "{number, plural, one {# day} other {# days}} left",
|
||||
|
@ -530,11 +530,11 @@
|
|||
"audio.play": "Play",
|
||||
"audio.unmute": "Unmute",
|
||||
"boost_modal.combo": "You can press {combo} to skip this next time",
|
||||
"bundle_column_error.body": "Something went wrong while loading this component.",
|
||||
"bundle_column_error.body": "Something went wrong while loading this page.",
|
||||
"bundle_column_error.retry": "Try again",
|
||||
"bundle_column_error.title": "Network error",
|
||||
"bundle_modal_error.close": "Close",
|
||||
"bundle_modal_error.message": "Something went wrong while loading this component.",
|
||||
"bundle_modal_error.message": "Something went wrong while loading this page.",
|
||||
"bundle_modal_error.retry": "Try again",
|
||||
"column.blocks": "Blocked users",
|
||||
"column.community": "Local timeline",
|
||||
|
@ -547,7 +547,7 @@
|
|||
"column.home": "Home",
|
||||
"column.lists": "Lists",
|
||||
"column.mutes": "Muted users",
|
||||
"column.notifications": "Notifications",
|
||||
"column.notifications": "Alerts",
|
||||
"column.preferences": "Preferences",
|
||||
"column.public": "Federated timeline",
|
||||
"column.security": "Security",
|
||||
|
@ -732,7 +732,7 @@
|
|||
"login.fields.username_placeholder": "Username",
|
||||
"login.log_in": "Log in",
|
||||
"login.reset_password_hint": "Trouble logging in?",
|
||||
"media_gallery.toggle_visible": "Toggle visibility",
|
||||
"media_gallery.toggle_visible": "Hide",
|
||||
"missing_indicator.label": "Not found",
|
||||
"missing_indicator.sublabel": "This resource could not be found",
|
||||
"morefollows.followers_label": "…and {count} more {count, plural, one {follower} other {followers}} on remote sites.",
|
||||
|
@ -924,7 +924,7 @@
|
|||
"tabs_bar.apps": "Apps",
|
||||
"tabs_bar.home": "Home",
|
||||
"tabs_bar.news": "News",
|
||||
"tabs_bar.notifications": "Notifications",
|
||||
"tabs_bar.notifications": "Alerts",
|
||||
"tabs_bar.post": "Post",
|
||||
"tabs_bar.search": "Search",
|
||||
"time_remaining.days": "{number, plural, one {# day} other {# days}} left",
|
||||
|
|
290
app/soapbox/__fixtures__/notification-favourite.json
Normal file
290
app/soapbox/__fixtures__/notification-favourite.json
Normal file
|
@ -0,0 +1,290 @@
|
|||
{
|
||||
"account": {
|
||||
"acct": "Hollahollara@spinster.xyz",
|
||||
"avatar": "https://gleasonator.com/proxy/LArKQiIrW265rGIJGwdgX7rRsao/aHR0cHM6Ly9tZWRpYS5zcGluc3Rlci54eXovYWNjb3VudHMvYXZhdGFycy8wMDAvMTQxLzI5NC9vcmlnaW5hbC9lNjA1NjljMjBjNGY3ODNjLnBuZw/e60569c20c4f783c.png",
|
||||
"avatar_static": "https://gleasonator.com/proxy/LArKQiIrW265rGIJGwdgX7rRsao/aHR0cHM6Ly9tZWRpYS5zcGluc3Rlci54eXovYWNjb3VudHMvYXZhdGFycy8wMDAvMTQxLzI5NC9vcmlnaW5hbC9lNjA1NjljMjBjNGY3ODNjLnBuZw/e60569c20c4f783c.png",
|
||||
"bot": false,
|
||||
"created_at": "2020-05-29T03:15:59.000Z",
|
||||
"display_name": "Hollahollara",
|
||||
"emojis": [],
|
||||
"fields": [],
|
||||
"followers_count": 0,
|
||||
"following_count": 0,
|
||||
"fqn": "Hollahollara@spinster.xyz",
|
||||
"header": "https://gleasonator.com/proxy/XSANC57uDBL3tM0LBLEer7yMyaA/aHR0cHM6Ly9tZWRpYS5zcGluc3Rlci54eXovYWNjb3VudHMvaGVhZGVycy8wMDAvMTQxLzI5NC9vcmlnaW5hbC84NTMzMWEzMjJkMTIyN2Q0LnBuZw/85331a322d1227d4.png",
|
||||
"header_static": "https://gleasonator.com/proxy/XSANC57uDBL3tM0LBLEer7yMyaA/aHR0cHM6Ly9tZWRpYS5zcGluc3Rlci54eXovYWNjb3VudHMvaGVhZGVycy8wMDAvMTQxLzI5NC9vcmlnaW5hbC84NTMzMWEzMjJkMTIyN2Q0LnBuZw/85331a322d1227d4.png",
|
||||
"id": "9vWfJdLwuJSyJXqCeG",
|
||||
"last_status_at": "2022-04-16T20:33:32",
|
||||
"locked": true,
|
||||
"note": "Adult human female. Artist. Evil terv. Millennial, killing all the things. Public Universal Friend.<br/><br/><a href=\"http://www.jenniferaldridge.com\">www.jenniferaldridge.com</a><br/><br/><br/>",
|
||||
"pleroma": {
|
||||
"accepts_chat_messages": true,
|
||||
"also_known_as": [],
|
||||
"ap_id": "https://spinster.xyz/users/Hollahollara",
|
||||
"background_image": null,
|
||||
"deactivated": false,
|
||||
"favicon": "https://gleasonator.com/proxy/owo6QgsHm_0ogz5enHyvD68wDUA/aHR0cHM6Ly9zcGluc3Rlci54eXovZmF2aWNvbi5wbmc/favicon.png",
|
||||
"hide_favorites": true,
|
||||
"hide_followers": true,
|
||||
"hide_followers_count": false,
|
||||
"hide_follows": true,
|
||||
"hide_follows_count": false,
|
||||
"is_admin": false,
|
||||
"is_confirmed": true,
|
||||
"is_moderator": false,
|
||||
"is_suggested": false,
|
||||
"location": null,
|
||||
"relationship": {},
|
||||
"skip_thread_containment": false,
|
||||
"tags": []
|
||||
},
|
||||
"source": {
|
||||
"fields": [],
|
||||
"note": "",
|
||||
"pleroma": {
|
||||
"actor_type": "Person",
|
||||
"discoverable": false
|
||||
},
|
||||
"sensitive": false
|
||||
},
|
||||
"statuses_count": 7191,
|
||||
"url": "https://spinster.xyz/users/Hollahollara",
|
||||
"username": "Hollahollara"
|
||||
},
|
||||
"created_at": "2022-04-14T20:36:52.000Z",
|
||||
"id": "427825",
|
||||
"pleroma": {
|
||||
"is_muted": false,
|
||||
"is_seen": true
|
||||
},
|
||||
"status": {
|
||||
"account": {
|
||||
"acct": "alex",
|
||||
"avatar": "https://media.gleasonator.com/6d64aecb17348b23aaff78db4687b9476cb0da1c07cc6a819c2e6ec7144c18b1.png",
|
||||
"avatar_static": "https://media.gleasonator.com/6d64aecb17348b23aaff78db4687b9476cb0da1c07cc6a819c2e6ec7144c18b1.png",
|
||||
"bot": false,
|
||||
"created_at": "2020-01-08T01:25:43.000Z",
|
||||
"display_name": "Alex Gleason",
|
||||
"emojis": [],
|
||||
"fields": [
|
||||
{
|
||||
"name": "Website",
|
||||
"value": "<a href=\"https://alexgleason.me\" rel=\"ugc\">https://alexgleason.me</a>"
|
||||
},
|
||||
{
|
||||
"name": "Soapbox",
|
||||
"value": "<a href=\"https://soapbox.pub\" rel=\"ugc\">https://soapbox.pub</a>"
|
||||
},
|
||||
{
|
||||
"name": "Email",
|
||||
"value": "alex@alexgleason.me"
|
||||
},
|
||||
{
|
||||
"name": "Gender identity",
|
||||
"value": "Soyboy"
|
||||
},
|
||||
{
|
||||
"name": "Donate (PayPal)",
|
||||
"value": "<a href=\"https://paypal.me/gleasonator\" rel=\"ugc\">https://paypal.me/gleasonator</a>"
|
||||
},
|
||||
{
|
||||
"name": "$BTC",
|
||||
"value": "bc1q9cx35adpm73aq2fw40ye6ts8hfxqzjr5unwg0n"
|
||||
},
|
||||
{
|
||||
"name": "$ETH",
|
||||
"value": "0xAc9aB5Fc04Dc1cB1789Af75b523Bd23C70B2D717"
|
||||
},
|
||||
{
|
||||
"name": "$DOGE",
|
||||
"value": "D5zVZs6jrRakaPVGiErkQiHt9sayzm6V5D"
|
||||
},
|
||||
{
|
||||
"name": "$XMR",
|
||||
"value": "45JDCLrjJ4bgVUSbbs2yjy9m5Mf4VLPW8fG7jw9sq5u69rXZZopQogZNeyYkMBnXpkaip4p4QwaaJNhdTotPa9g44DBCzdK"
|
||||
}
|
||||
],
|
||||
"follow_requests_count": 0,
|
||||
"followers_count": 2602,
|
||||
"following_count": 1603,
|
||||
"fqn": "alex@gleasonator.com",
|
||||
"header": "https://media.gleasonator.com/accounts/headers/000/000/001/original/9d0e4dbf1c9dbc8f.png",
|
||||
"header_static": "https://media.gleasonator.com/accounts/headers/000/000/001/original/9d0e4dbf1c9dbc8f.png",
|
||||
"id": "9v5bmRalQvjOy0ECcC",
|
||||
"last_status_at": "2022-04-16T19:23:50",
|
||||
"locked": false,
|
||||
"note": "I create Fediverse software that empowers people online.<br/><br/>I'm vegan btw<br/><br/>Note: If you have a question for me, please tag me publicly. This gives the opportunity for others to chime in, and bystanders to learn.",
|
||||
"pleroma": {
|
||||
"accepts_chat_messages": true,
|
||||
"accepts_email_list": true,
|
||||
"allow_following_move": true,
|
||||
"also_known_as": [
|
||||
"https://mitra.social/users/alex"
|
||||
],
|
||||
"ap_id": "https://gleasonator.com/users/alex",
|
||||
"background_image": null,
|
||||
"birthday": "1993-07-03",
|
||||
"deactivated": false,
|
||||
"email": "alex@alexgleason.me",
|
||||
"favicon": "https://gleasonator.com/favicon.png",
|
||||
"hide_favorites": true,
|
||||
"hide_followers": false,
|
||||
"hide_followers_count": false,
|
||||
"hide_follows": false,
|
||||
"hide_follows_count": false,
|
||||
"is_admin": true,
|
||||
"is_confirmed": true,
|
||||
"is_moderator": false,
|
||||
"is_suggested": true,
|
||||
"location": "Texas",
|
||||
"notification_settings": {
|
||||
"block_from_strangers": false,
|
||||
"hide_notification_contents": false
|
||||
},
|
||||
"relationship": {},
|
||||
"skip_thread_containment": false,
|
||||
"tags": [],
|
||||
"unread_conversation_count": 392,
|
||||
"unread_notifications_count": 2
|
||||
},
|
||||
"source": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "Website",
|
||||
"value": "https://alexgleason.me"
|
||||
},
|
||||
{
|
||||
"name": "Soapbox",
|
||||
"value": "https://soapbox.pub"
|
||||
},
|
||||
{
|
||||
"name": "Email",
|
||||
"value": "alex@alexgleason.me"
|
||||
},
|
||||
{
|
||||
"name": "Gender identity",
|
||||
"value": "Soyboy"
|
||||
},
|
||||
{
|
||||
"name": "Donate (PayPal)",
|
||||
"value": "https://paypal.me/gleasonator"
|
||||
},
|
||||
{
|
||||
"name": "$BTC",
|
||||
"value": "bc1q9cx35adpm73aq2fw40ye6ts8hfxqzjr5unwg0n"
|
||||
},
|
||||
{
|
||||
"name": "$ETH",
|
||||
"value": "0xAc9aB5Fc04Dc1cB1789Af75b523Bd23C70B2D717"
|
||||
},
|
||||
{
|
||||
"name": "$DOGE",
|
||||
"value": "D5zVZs6jrRakaPVGiErkQiHt9sayzm6V5D"
|
||||
},
|
||||
{
|
||||
"name": "$XMR",
|
||||
"value": "45JDCLrjJ4bgVUSbbs2yjy9m5Mf4VLPW8fG7jw9sq5u69rXZZopQogZNeyYkMBnXpkaip4p4QwaaJNhdTotPa9g44DBCzdK"
|
||||
}
|
||||
],
|
||||
"note": "I create Fediverse software that empowers people online.\r\n\r\nI'm vegan btw\r\n\r\nNote: If you have a question for me, please tag me publicly. This gives the opportunity for others to chime in, and bystanders to learn.",
|
||||
"pleroma": {
|
||||
"actor_type": "Person",
|
||||
"discoverable": false,
|
||||
"no_rich_text": false,
|
||||
"show_birthday": true,
|
||||
"show_role": true
|
||||
},
|
||||
"privacy": "public",
|
||||
"sensitive": false
|
||||
},
|
||||
"statuses_count": 24050,
|
||||
"url": "https://gleasonator.com/users/alex",
|
||||
"username": "alex"
|
||||
},
|
||||
"application": {
|
||||
"name": "Soapbox FE",
|
||||
"website": "https://soapbox.pub/"
|
||||
},
|
||||
"bookmarked": false,
|
||||
"card": null,
|
||||
"content": "",
|
||||
"created_at": "2022-04-12T01:31:00.000Z",
|
||||
"emojis": [],
|
||||
"favourited": false,
|
||||
"favourites_count": 11,
|
||||
"id": "AIMEslRcKrcu02D3HU",
|
||||
"in_reply_to_account_id": null,
|
||||
"in_reply_to_id": null,
|
||||
"language": null,
|
||||
"media_attachments": [
|
||||
{
|
||||
"blurhash": "etMZzVWq%1%1o#_NayWCofae_Ns:R*kDjYS5a{jYoJj]V@a}WBbGof",
|
||||
"description": "",
|
||||
"id": "AIMEqtBeZtvpQvqfIG",
|
||||
"meta": {
|
||||
"original": {
|
||||
"aspect": 0.9726443768996961,
|
||||
"height": 658,
|
||||
"width": 640
|
||||
}
|
||||
},
|
||||
"pleroma": {
|
||||
"mime_type": "image/jpeg"
|
||||
},
|
||||
"preview_url": "https://media.gleasonator.com/6c0a1d878b7c9d1d737f415645cf34cdacdf6438c468348f4fa7534a15798023.jpg",
|
||||
"remote_url": "https://media.gleasonator.com/6c0a1d878b7c9d1d737f415645cf34cdacdf6438c468348f4fa7534a15798023.jpg",
|
||||
"text_url": "https://media.gleasonator.com/6c0a1d878b7c9d1d737f415645cf34cdacdf6438c468348f4fa7534a15798023.jpg",
|
||||
"type": "image",
|
||||
"url": "https://media.gleasonator.com/6c0a1d878b7c9d1d737f415645cf34cdacdf6438c468348f4fa7534a15798023.jpg"
|
||||
}
|
||||
],
|
||||
"mentions": [],
|
||||
"muted": false,
|
||||
"pinned": false,
|
||||
"pleroma": {
|
||||
"content": {
|
||||
"text/plain": ""
|
||||
},
|
||||
"content_type": null,
|
||||
"conversation_id": "AIMEslPqRSCzuXNdWC",
|
||||
"direct_conversation_id": null,
|
||||
"emoji_reactions": [
|
||||
{
|
||||
"count": 4,
|
||||
"me": false,
|
||||
"name": "😆"
|
||||
},
|
||||
{
|
||||
"count": 1,
|
||||
"me": false,
|
||||
"name": "🤢"
|
||||
}
|
||||
],
|
||||
"expires_at": null,
|
||||
"in_reply_to_account_acct": null,
|
||||
"local": true,
|
||||
"parent_visible": false,
|
||||
"pinned_at": null,
|
||||
"quote": null,
|
||||
"quote_url": null,
|
||||
"quote_visible": false,
|
||||
"spoiler_text": {
|
||||
"text/plain": ""
|
||||
},
|
||||
"thread_muted": false
|
||||
},
|
||||
"poll": null,
|
||||
"reblog": null,
|
||||
"reblogged": false,
|
||||
"reblogs_count": 4,
|
||||
"replies_count": 0,
|
||||
"sensitive": false,
|
||||
"spoiler_text": "",
|
||||
"tags": [],
|
||||
"text": null,
|
||||
"uri": "https://gleasonator.com/objects/7953f9fb-d3d7-4f50-b9d8-27e311ac1f5e",
|
||||
"url": "https://gleasonator.com/notice/AIMEslRcKrcu02D3HU",
|
||||
"visibility": "public"
|
||||
},
|
||||
"type": "favourite"
|
||||
}
|
61
app/soapbox/__fixtures__/notification-follow.json
Normal file
61
app/soapbox/__fixtures__/notification-follow.json
Normal file
|
@ -0,0 +1,61 @@
|
|||
{
|
||||
"account": {
|
||||
"acct": "neko@rdrama.cc",
|
||||
"avatar": "https://gleasonator.com/proxy/QJ3einzsXdobgWPsyZowxnor1zY/aHR0cHM6Ly9yZHJhbWEuY2MvbWVkaWEvODcyNDhjYjctZWYwNC00ZThjLWEwYzEtNTYxNWMyNWM0MTk1L2Jsb2I/blob",
|
||||
"avatar_static": "https://gleasonator.com/proxy/QJ3einzsXdobgWPsyZowxnor1zY/aHR0cHM6Ly9yZHJhbWEuY2MvbWVkaWEvODcyNDhjYjctZWYwNC00ZThjLWEwYzEtNTYxNWMyNWM0MTk1L2Jsb2I/blob",
|
||||
"bot": false,
|
||||
"created_at": "2022-04-16T20:23:16.000Z",
|
||||
"display_name": "Nekobit",
|
||||
"emojis": [],
|
||||
"fields": [],
|
||||
"followers_count": 19,
|
||||
"following_count": 357,
|
||||
"fqn": "neko@rdrama.cc",
|
||||
"header": "https://gleasonator.com/proxy/ojpBSVKfePvLnb7pwqepQspzIko/aHR0cHM6Ly9yZHJhbWEuY2MvbWVkaWEvNjBkMTJjOWYtOTNkNi00ODBmLThhMGUtMTE3M2ZkNjg5MzhmL3dhbGxwYXBlcmZsYXJlLmNvbV93YWxscGFwZXItd2ViLmpwZw/wallpaperflare.com_wallpaper-web.jpg",
|
||||
"header_static": "https://gleasonator.com/proxy/ojpBSVKfePvLnb7pwqepQspzIko/aHR0cHM6Ly9yZHJhbWEuY2MvbWVkaWEvNjBkMTJjOWYtOTNkNi00ODBmLThhMGUtMTE3M2ZkNjg5MzhmL3dhbGxwYXBlcmZsYXJlLmNvbV93YWxscGFwZXItd2ViLmpwZw/wallpaperflare.com_wallpaper-web.jpg",
|
||||
"id": "AIW9zGESDwdT27vk0W",
|
||||
"last_status_at": "2022-04-16T21:49:29",
|
||||
"locked": false,
|
||||
"note": "New instance, hello!<br/><br/>Please follow if you followed my <a href=\"http://desuposter.club\">desuposter.club</a> alt",
|
||||
"pleroma": {
|
||||
"accepts_chat_messages": true,
|
||||
"also_known_as": [],
|
||||
"ap_id": "https://rdrama.cc/users/neko",
|
||||
"background_image": null,
|
||||
"deactivated": false,
|
||||
"favicon": "https://gleasonator.com/proxy/dbCdmChqVRi0vjYTCpRj5lDLtNM/aHR0cHM6Ly9yZHJhbWEuY2MvZmF2aWNvbi5wbmc/favicon.png",
|
||||
"hide_favorites": true,
|
||||
"hide_followers": false,
|
||||
"hide_followers_count": false,
|
||||
"hide_follows": false,
|
||||
"hide_follows_count": false,
|
||||
"is_admin": false,
|
||||
"is_confirmed": true,
|
||||
"is_moderator": false,
|
||||
"is_suggested": false,
|
||||
"location": null,
|
||||
"relationship": {},
|
||||
"skip_thread_containment": false,
|
||||
"tags": []
|
||||
},
|
||||
"source": {
|
||||
"fields": [],
|
||||
"note": "",
|
||||
"pleroma": {
|
||||
"actor_type": "Person",
|
||||
"discoverable": false
|
||||
},
|
||||
"sensitive": false
|
||||
},
|
||||
"statuses_count": 6,
|
||||
"url": "https://rdrama.cc/users/neko",
|
||||
"username": "neko"
|
||||
},
|
||||
"created_at": "2022-04-16T20:24:03.000Z",
|
||||
"id": "429280",
|
||||
"pleroma": {
|
||||
"is_muted": false,
|
||||
"is_seen": true
|
||||
},
|
||||
"type": "follow"
|
||||
}
|
61
app/soapbox/__fixtures__/notification-follow_request.json
Normal file
61
app/soapbox/__fixtures__/notification-follow_request.json
Normal file
|
@ -0,0 +1,61 @@
|
|||
{
|
||||
"account": {
|
||||
"acct": "alex@spinster.xyz",
|
||||
"avatar": "https://gleasonator.com/images/avi.png",
|
||||
"avatar_static": "https://gleasonator.com/images/avi.png",
|
||||
"bot": false,
|
||||
"created_at": "2020-01-08T03:08:22.000Z",
|
||||
"display_name": "**MOVED**",
|
||||
"emojis": [],
|
||||
"fields": [],
|
||||
"followers_count": 1005,
|
||||
"following_count": 724,
|
||||
"fqn": "alex@spinster.xyz",
|
||||
"header": "https://gleasonator.com/proxy/yxa7ucolLFAsmBHYJzksSh_zoao/aHR0cHM6Ly9tZWRpYS5zcGluc3Rlci54eXovYWNjb3VudHMvaGVhZGVycy8wMDAvMDAwLzAwMS9vcmlnaW5hbC83ZmE4MWY5ZmZiYWVjZDk3LnBuZw/7fa81f9ffbaecd97.png",
|
||||
"header_static": "https://gleasonator.com/proxy/yxa7ucolLFAsmBHYJzksSh_zoao/aHR0cHM6Ly9tZWRpYS5zcGluc3Rlci54eXovYWNjb3VudHMvaGVhZGVycy8wMDAvMDAwLzAwMS9vcmlnaW5hbC83ZmE4MWY5ZmZiYWVjZDk3LnBuZw/7fa81f9ffbaecd97.png",
|
||||
"id": "9v5bmXkCYkqU30gp9s",
|
||||
"last_status_at": null,
|
||||
"locked": true,
|
||||
"note": "Moved to <a href=\"https://spinster.xyz/@alex@gleasonator.com\">https://spinster.xyz/@alex@gleasonator.com</a>",
|
||||
"pleroma": {
|
||||
"accepts_chat_messages": true,
|
||||
"also_known_as": [],
|
||||
"ap_id": "https://spinster.xyz/users/alex",
|
||||
"background_image": null,
|
||||
"deactivated": false,
|
||||
"favicon": "https://gleasonator.com/proxy/owo6QgsHm_0ogz5enHyvD68wDUA/aHR0cHM6Ly9zcGluc3Rlci54eXovZmF2aWNvbi5wbmc/favicon.png",
|
||||
"hide_favorites": true,
|
||||
"hide_followers": false,
|
||||
"hide_followers_count": false,
|
||||
"hide_follows": false,
|
||||
"hide_follows_count": false,
|
||||
"is_admin": false,
|
||||
"is_confirmed": false,
|
||||
"is_moderator": false,
|
||||
"is_suggested": false,
|
||||
"location": null,
|
||||
"relationship": {},
|
||||
"skip_thread_containment": false,
|
||||
"tags": []
|
||||
},
|
||||
"source": {
|
||||
"fields": [],
|
||||
"note": "",
|
||||
"pleroma": {
|
||||
"actor_type": "Person",
|
||||
"discoverable": false
|
||||
},
|
||||
"sensitive": false
|
||||
},
|
||||
"statuses_count": 2687,
|
||||
"url": "https://spinster.xyz/users/alex",
|
||||
"username": "alex"
|
||||
},
|
||||
"created_at": "2020-12-30T02:23:35.000Z",
|
||||
"id": "87967",
|
||||
"pleroma": {
|
||||
"is_muted": false,
|
||||
"is_seen": true
|
||||
},
|
||||
"type": "follow_request"
|
||||
}
|
226
app/soapbox/__fixtures__/notification-mention.json
Normal file
226
app/soapbox/__fixtures__/notification-mention.json
Normal file
|
@ -0,0 +1,226 @@
|
|||
{
|
||||
"account": {
|
||||
"acct": "silverpill@mitra.social",
|
||||
"avatar": "https://gleasonator.com/proxy/ZbLqy9s8Hxn9I5K23y2mffsL6iY/aHR0cHM6Ly9taXRyYS5zb2NpYWwvbWVkaWEvNmE3ODViZjdkZDA1ZjYxYzM1OTBlODkzNWFhNDkxNTZhNDk5YWMzMGZkMWU0MDJmNzllN2UxNjRhZGIzNmUyYy5wbmc/6a785bf7dd05f61c3590e8935aa49156a499ac30fd1e402f79e7e164adb36e2c.png",
|
||||
"avatar_static": "https://gleasonator.com/proxy/ZbLqy9s8Hxn9I5K23y2mffsL6iY/aHR0cHM6Ly9taXRyYS5zb2NpYWwvbWVkaWEvNmE3ODViZjdkZDA1ZjYxYzM1OTBlODkzNWFhNDkxNTZhNDk5YWMzMGZkMWU0MDJmNzllN2UxNjRhZGIzNmUyYy5wbmc/6a785bf7dd05f61c3590e8935aa49156a499ac30fd1e402f79e7e164adb36e2c.png",
|
||||
"bot": false,
|
||||
"created_at": "2021-11-11T22:31:51.000Z",
|
||||
"display_name": "silverpill",
|
||||
"emojis": [],
|
||||
"fields": [
|
||||
{
|
||||
"name": "Matrix",
|
||||
"value": "@silverpill:poa.st"
|
||||
},
|
||||
{
|
||||
"name": "Alt",
|
||||
"value": "@silverpill@poa.st"
|
||||
},
|
||||
{
|
||||
"name": "Code",
|
||||
"value": "<a href=\"https://codeberg.org/silverpill/\">https://codeberg.org/silverpill/</a>"
|
||||
},
|
||||
{
|
||||
"name": "$XMR",
|
||||
"value": "884y9LmsWY7PQNsyR7bJy1dvj91tuF5spVabyCnPk4KfQtSuzFbQobTFC7xSemJgVW1FWAwnJbjTZX5zZWbBrfkv62DB62d"
|
||||
}
|
||||
],
|
||||
"followers_count": 0,
|
||||
"following_count": 0,
|
||||
"fqn": "silverpill@mitra.social",
|
||||
"header": "https://gleasonator.com/images/banner.png",
|
||||
"header_static": "https://gleasonator.com/images/banner.png",
|
||||
"id": "ADIzJ7q9gExPvDKBCS",
|
||||
"last_status_at": "2022-04-15T11:27:33",
|
||||
"locked": false,
|
||||
"note": "",
|
||||
"pleroma": {
|
||||
"accepts_chat_messages": false,
|
||||
"also_known_as": [],
|
||||
"ap_id": "https://mitra.social/users/silverpill",
|
||||
"background_image": null,
|
||||
"deactivated": false,
|
||||
"favicon": "https://gleasonator.com/proxy/XSE9_kQbQyYcSFWszWx2GgCbBuY/aHR0cHM6Ly9taXRyYS5zb2NpYWwvZmF2aWNvbi5pY28/favicon.ico",
|
||||
"hide_favorites": true,
|
||||
"hide_followers": true,
|
||||
"hide_followers_count": false,
|
||||
"hide_follows": true,
|
||||
"hide_follows_count": false,
|
||||
"is_admin": false,
|
||||
"is_confirmed": true,
|
||||
"is_moderator": false,
|
||||
"is_suggested": false,
|
||||
"location": null,
|
||||
"relationship": {},
|
||||
"skip_thread_containment": false,
|
||||
"tags": []
|
||||
},
|
||||
"source": {
|
||||
"fields": [],
|
||||
"note": "",
|
||||
"pleroma": {
|
||||
"actor_type": "Person",
|
||||
"discoverable": false
|
||||
},
|
||||
"sensitive": false
|
||||
},
|
||||
"statuses_count": 135,
|
||||
"url": "https://mitra.social/users/silverpill",
|
||||
"username": "silverpill"
|
||||
},
|
||||
"created_at": "2022-04-15T11:27:33.000Z",
|
||||
"id": "428172",
|
||||
"pleroma": {
|
||||
"is_muted": false,
|
||||
"is_seen": true
|
||||
},
|
||||
"status": {
|
||||
"account": {
|
||||
"acct": "silverpill@mitra.social",
|
||||
"avatar": "https://gleasonator.com/proxy/ZbLqy9s8Hxn9I5K23y2mffsL6iY/aHR0cHM6Ly9taXRyYS5zb2NpYWwvbWVkaWEvNmE3ODViZjdkZDA1ZjYxYzM1OTBlODkzNWFhNDkxNTZhNDk5YWMzMGZkMWU0MDJmNzllN2UxNjRhZGIzNmUyYy5wbmc/6a785bf7dd05f61c3590e8935aa49156a499ac30fd1e402f79e7e164adb36e2c.png",
|
||||
"avatar_static": "https://gleasonator.com/proxy/ZbLqy9s8Hxn9I5K23y2mffsL6iY/aHR0cHM6Ly9taXRyYS5zb2NpYWwvbWVkaWEvNmE3ODViZjdkZDA1ZjYxYzM1OTBlODkzNWFhNDkxNTZhNDk5YWMzMGZkMWU0MDJmNzllN2UxNjRhZGIzNmUyYy5wbmc/6a785bf7dd05f61c3590e8935aa49156a499ac30fd1e402f79e7e164adb36e2c.png",
|
||||
"bot": false,
|
||||
"created_at": "2021-11-11T22:31:51.000Z",
|
||||
"display_name": "silverpill",
|
||||
"emojis": [],
|
||||
"fields": [
|
||||
{
|
||||
"name": "Matrix",
|
||||
"value": "@silverpill:poa.st"
|
||||
},
|
||||
{
|
||||
"name": "Alt",
|
||||
"value": "@silverpill@poa.st"
|
||||
},
|
||||
{
|
||||
"name": "Code",
|
||||
"value": "<a href=\"https://codeberg.org/silverpill/\">https://codeberg.org/silverpill/</a>"
|
||||
},
|
||||
{
|
||||
"name": "$XMR",
|
||||
"value": "884y9LmsWY7PQNsyR7bJy1dvj91tuF5spVabyCnPk4KfQtSuzFbQobTFC7xSemJgVW1FWAwnJbjTZX5zZWbBrfkv62DB62d"
|
||||
}
|
||||
],
|
||||
"followers_count": 0,
|
||||
"following_count": 0,
|
||||
"fqn": "silverpill@mitra.social",
|
||||
"header": "https://gleasonator.com/images/banner.png",
|
||||
"header_static": "https://gleasonator.com/images/banner.png",
|
||||
"id": "ADIzJ7q9gExPvDKBCS",
|
||||
"last_status_at": "2022-04-15T11:27:33",
|
||||
"locked": false,
|
||||
"note": "",
|
||||
"pleroma": {
|
||||
"accepts_chat_messages": false,
|
||||
"also_known_as": [],
|
||||
"ap_id": "https://mitra.social/users/silverpill",
|
||||
"background_image": null,
|
||||
"deactivated": false,
|
||||
"favicon": "https://gleasonator.com/proxy/XSE9_kQbQyYcSFWszWx2GgCbBuY/aHR0cHM6Ly9taXRyYS5zb2NpYWwvZmF2aWNvbi5pY28/favicon.ico",
|
||||
"hide_favorites": true,
|
||||
"hide_followers": true,
|
||||
"hide_followers_count": false,
|
||||
"hide_follows": true,
|
||||
"hide_follows_count": false,
|
||||
"is_admin": false,
|
||||
"is_confirmed": true,
|
||||
"is_moderator": false,
|
||||
"is_suggested": false,
|
||||
"location": null,
|
||||
"relationship": {},
|
||||
"skip_thread_containment": false,
|
||||
"tags": []
|
||||
},
|
||||
"source": {
|
||||
"fields": [],
|
||||
"note": "",
|
||||
"pleroma": {
|
||||
"actor_type": "Person",
|
||||
"discoverable": false
|
||||
},
|
||||
"sensitive": false
|
||||
},
|
||||
"statuses_count": 135,
|
||||
"url": "https://mitra.social/users/silverpill",
|
||||
"username": "silverpill"
|
||||
},
|
||||
"application": null,
|
||||
"bookmarked": true,
|
||||
"card": {
|
||||
"author_name": "",
|
||||
"author_url": "",
|
||||
"blurhash": null,
|
||||
"description": "The ActivityPub protocol is a decentralized social networking protocol\n based upon the [ActivityStreams] 2.0 data format.\n It provides a client to server API for creating, updating and deleting\n content, as well as a federated server to server API for delivering\n notifications and content.",
|
||||
"embed_url": "",
|
||||
"height": 0,
|
||||
"html": "",
|
||||
"image": null,
|
||||
"provider_name": "www.w3.org",
|
||||
"provider_url": "https://www.w3.org",
|
||||
"title": "ActivityPub",
|
||||
"type": "link",
|
||||
"url": "https://www.w3.org/TR/activitypub/#retrieving-objects",
|
||||
"width": 0
|
||||
},
|
||||
"content": "<span class=\"h-card\"><a class=\"u-url mention\" href=\"https://gleasonator.com/users/alex\">@alex</a></span> <span class=\"h-card\"><a class=\"u-url mention\" href=\"https://lain.com/users/lain\">@lain</a></span> The second one is suggested by ActivityPub spec: <a href=\"https://www.w3.org/TR/activitypub/#retrieving-objects\">https://www.w3.org/TR/activitypub/#retrieving-objects</a><br/>\nThe first one is likely a legacy of earlier ActivityStreams standards, I'm not sure",
|
||||
"created_at": "2022-04-15T11:27:28.000Z",
|
||||
"emojis": [],
|
||||
"favourited": true,
|
||||
"favourites_count": 2,
|
||||
"id": "AITJf9Wpr0msWChNBI",
|
||||
"in_reply_to_account_id": "9v5bmRalQvjOy0ECcC",
|
||||
"in_reply_to_id": "AISPFI5nnPaS7J94rI",
|
||||
"language": null,
|
||||
"media_attachments": [],
|
||||
"mentions": [
|
||||
{
|
||||
"acct": "alex",
|
||||
"id": "9v5bmRalQvjOy0ECcC",
|
||||
"url": "https://gleasonator.com/users/alex",
|
||||
"username": "alex"
|
||||
},
|
||||
{
|
||||
"acct": "lain@lain.com",
|
||||
"id": "9v5bqYwY2jfmvPNhTM",
|
||||
"url": "https://lain.com/users/lain",
|
||||
"username": "lain"
|
||||
}
|
||||
],
|
||||
"muted": false,
|
||||
"pinned": false,
|
||||
"pleroma": {
|
||||
"content": {
|
||||
"text/plain": "@alex @lain The second one is suggested by ActivityPub spec: https://www.w3.org/TR/activitypub/#retrieving-objects\nThe first one is likely a legacy of earlier ActivityStreams standards, I'm not sure"
|
||||
},
|
||||
"content_type": null,
|
||||
"conversation_id": "AISPFI2bzH2DxPeWsy",
|
||||
"direct_conversation_id": null,
|
||||
"emoji_reactions": [],
|
||||
"expires_at": null,
|
||||
"in_reply_to_account_acct": "alex",
|
||||
"local": false,
|
||||
"parent_visible": true,
|
||||
"pinned_at": null,
|
||||
"quote": null,
|
||||
"quote_url": null,
|
||||
"quote_visible": false,
|
||||
"spoiler_text": {
|
||||
"text/plain": ""
|
||||
},
|
||||
"thread_muted": false
|
||||
},
|
||||
"poll": null,
|
||||
"reblog": null,
|
||||
"reblogged": false,
|
||||
"reblogs_count": 0,
|
||||
"replies_count": 0,
|
||||
"sensitive": false,
|
||||
"spoiler_text": "",
|
||||
"tags": [],
|
||||
"text": null,
|
||||
"uri": "https://mitra.social/objects/01802cfa-633c-1c2c-e9cf-e6e0ffef0afe",
|
||||
"url": "https://mitra.social/objects/01802cfa-633c-1c2c-e9cf-e6e0ffef0afe",
|
||||
"visibility": "public"
|
||||
},
|
||||
"type": "mention"
|
||||
}
|
119
app/soapbox/__fixtures__/notification-move.json
Normal file
119
app/soapbox/__fixtures__/notification-move.json
Normal file
|
@ -0,0 +1,119 @@
|
|||
{
|
||||
"account": {
|
||||
"acct": "alex@fedibird.com",
|
||||
"avatar": "https://gleasonator.com/images/avi.png",
|
||||
"avatar_static": "https://gleasonator.com/images/avi.png",
|
||||
"bot": false,
|
||||
"created_at": "2022-01-24T21:25:37.000Z",
|
||||
"display_name": "alex@fedibird.com",
|
||||
"emojis": [],
|
||||
"fields": [],
|
||||
"followers_count": 0,
|
||||
"following_count": 2,
|
||||
"fqn": "alex@fedibird.com",
|
||||
"header": "https://gleasonator.com/images/banner.png",
|
||||
"header_static": "https://gleasonator.com/images/banner.png",
|
||||
"id": "AFmHQ18XZ7Lco68MW8",
|
||||
"last_status_at": "2022-03-16T22:07:53",
|
||||
"locked": false,
|
||||
"note": "<p></p>",
|
||||
"pleroma": {
|
||||
"accepts_chat_messages": null,
|
||||
"also_known_as": [],
|
||||
"ap_id": "https://fedibird.com/users/alex",
|
||||
"background_image": null,
|
||||
"birthday": "1993-07-03",
|
||||
"deactivated": false,
|
||||
"favicon": "https://gleasonator.com/proxy/HzfsidHss3CuA7aM2zxXN-tAjF8/aHR0cHM6Ly9mZWRpYmlyZC5jb20vZmF2aWNvbi5pY28/favicon.ico",
|
||||
"hide_favorites": true,
|
||||
"hide_followers": false,
|
||||
"hide_followers_count": false,
|
||||
"hide_follows": false,
|
||||
"hide_follows_count": false,
|
||||
"is_admin": false,
|
||||
"is_confirmed": true,
|
||||
"is_moderator": false,
|
||||
"is_suggested": false,
|
||||
"location": "Texas",
|
||||
"relationship": {},
|
||||
"skip_thread_containment": false,
|
||||
"tags": []
|
||||
},
|
||||
"source": {
|
||||
"fields": [],
|
||||
"note": "",
|
||||
"pleroma": {
|
||||
"actor_type": "Person",
|
||||
"discoverable": false
|
||||
},
|
||||
"sensitive": false
|
||||
},
|
||||
"statuses_count": 5,
|
||||
"url": "https://fedibird.com/@alex",
|
||||
"username": "alex"
|
||||
},
|
||||
"created_at": "2022-03-17T00:08:48.000Z",
|
||||
"id": "406814",
|
||||
"pleroma": {
|
||||
"is_muted": false,
|
||||
"is_seen": true
|
||||
},
|
||||
"target": {
|
||||
"acct": "benis911",
|
||||
"avatar": "https://gleasonator.com/images/avi.png",
|
||||
"avatar_static": "https://gleasonator.com/images/avi.png",
|
||||
"bot": false,
|
||||
"created_at": "2021-03-26T20:42:11.000Z",
|
||||
"display_name": "benis911",
|
||||
"emojis": [],
|
||||
"fields": [],
|
||||
"followers_count": 0,
|
||||
"following_count": 0,
|
||||
"fqn": "benis911@gleasonator.com",
|
||||
"header": "https://media.gleasonator.com/fc595bbbcf5aabefecd1c2adfe5b7f5457db59847992881668653a0338ba25bd.jpg",
|
||||
"header_static": "https://media.gleasonator.com/fc595bbbcf5aabefecd1c2adfe5b7f5457db59847992881668653a0338ba25bd.jpg",
|
||||
"id": "A5c5LK7EJTFR0u26Pg",
|
||||
"last_status_at": "2022-03-19T22:33:38",
|
||||
"locked": false,
|
||||
"note": "hello world 2",
|
||||
"pleroma": {
|
||||
"accepts_chat_messages": true,
|
||||
"also_known_as": [
|
||||
"https://gleasonator.com/users/alex",
|
||||
"https://poa.st/users/alex",
|
||||
"https://fedibird.com/users/alex"
|
||||
],
|
||||
"ap_id": "https://gleasonator.com/users/benis911",
|
||||
"background_image": null,
|
||||
"birthday": "2000-01-25",
|
||||
"deactivated": false,
|
||||
"favicon": "https://gleasonator.com/favicon.png",
|
||||
"hide_favorites": true,
|
||||
"hide_followers": true,
|
||||
"hide_followers_count": true,
|
||||
"hide_follows": true,
|
||||
"hide_follows_count": true,
|
||||
"is_admin": false,
|
||||
"is_confirmed": true,
|
||||
"is_moderator": false,
|
||||
"is_suggested": false,
|
||||
"location": null,
|
||||
"relationship": {},
|
||||
"skip_thread_containment": false,
|
||||
"tags": []
|
||||
},
|
||||
"source": {
|
||||
"fields": [],
|
||||
"note": "hello world 2",
|
||||
"pleroma": {
|
||||
"actor_type": "Person",
|
||||
"discoverable": false
|
||||
},
|
||||
"sensitive": false
|
||||
},
|
||||
"statuses_count": 174,
|
||||
"url": "https://gleasonator.com/users/benis911",
|
||||
"username": "benis911"
|
||||
},
|
||||
"type": "move"
|
||||
}
|
|
@ -0,0 +1,73 @@
|
|||
{
|
||||
"account": {
|
||||
"acct": "dave",
|
||||
"avatar": "https://media.gleasonator.com/68c29c30c18f30dd2898f85466bf1670312dda816617e6d31421c7e4c30a8265.png",
|
||||
"avatar_static": "https://media.gleasonator.com/68c29c30c18f30dd2898f85466bf1670312dda816617e6d31421c7e4c30a8265.png",
|
||||
"bot": false,
|
||||
"created_at": "2020-02-01T07:28:46.000Z",
|
||||
"display_name": "Elden Beedle 🇺🇦 🇫🇷",
|
||||
"emojis": [],
|
||||
"fields": [],
|
||||
"followers_count": 490,
|
||||
"following_count": 367,
|
||||
"fqn": "dave@gleasonator.com",
|
||||
"header": "https://media.gleasonator.com/47e8907c322a0e55d12b211846aa27c6b386e947326fe14bb09c89ef7317901d.jpg",
|
||||
"header_static": "https://media.gleasonator.com/47e8907c322a0e55d12b211846aa27c6b386e947326fe14bb09c89ef7317901d.jpg",
|
||||
"id": "9v5c0Pkz3MT5KTfam8",
|
||||
"last_status_at": "2022-04-16T19:57:10",
|
||||
"locked": false,
|
||||
"note": "Beedle is back, baby!<br/><br/>Mostly just crosspost memes and stuff I find on the internet",
|
||||
"pleroma": {
|
||||
"accepts_chat_messages": true,
|
||||
"also_known_as": [],
|
||||
"ap_id": "https://gleasonator.com/users/dave",
|
||||
"background_image": null,
|
||||
"birthday": "1990-01-01",
|
||||
"deactivated": false,
|
||||
"favicon": "https://gleasonator.com/favicon.png",
|
||||
"hide_favorites": true,
|
||||
"hide_followers": false,
|
||||
"hide_followers_count": false,
|
||||
"hide_follows": false,
|
||||
"hide_follows_count": false,
|
||||
"is_admin": false,
|
||||
"is_confirmed": true,
|
||||
"is_moderator": false,
|
||||
"is_suggested": true,
|
||||
"location": null,
|
||||
"relationship": {},
|
||||
"skip_thread_containment": false,
|
||||
"tags": []
|
||||
},
|
||||
"source": {
|
||||
"fields": [],
|
||||
"note": "Beedle is back, baby!\r\n\r\nMostly just crosspost memes and stuff I find on the internet",
|
||||
"pleroma": {
|
||||
"actor_type": "Person",
|
||||
"discoverable": false
|
||||
},
|
||||
"sensitive": false
|
||||
},
|
||||
"statuses_count": 16758,
|
||||
"url": "https://gleasonator.com/users/dave",
|
||||
"username": "dave"
|
||||
},
|
||||
"chat_message": {
|
||||
"account_id": "9v5c0Pkz3MT5KTfam8",
|
||||
"attachment": null,
|
||||
"card": null,
|
||||
"chat_id": "9yX4Q9DiC2te6lvk5g",
|
||||
"content": "Cool, it works, I'll keep letting you know when I find broken stuff",
|
||||
"created_at": "2022-04-16T19:22:54.000Z",
|
||||
"emojis": [],
|
||||
"id": "AIW4bHoICoZ9CsRTW4",
|
||||
"unread": false
|
||||
},
|
||||
"created_at": "2022-04-16T19:22:55.000Z",
|
||||
"id": "429247",
|
||||
"pleroma": {
|
||||
"is_muted": false,
|
||||
"is_seen": true
|
||||
},
|
||||
"type": "pleroma:chat_mention"
|
||||
}
|
|
@ -0,0 +1,301 @@
|
|||
{
|
||||
"account": {
|
||||
"acct": "dave",
|
||||
"avatar": "https://media.gleasonator.com/68c29c30c18f30dd2898f85466bf1670312dda816617e6d31421c7e4c30a8265.png",
|
||||
"avatar_static": "https://media.gleasonator.com/68c29c30c18f30dd2898f85466bf1670312dda816617e6d31421c7e4c30a8265.png",
|
||||
"bot": false,
|
||||
"created_at": "2020-02-01T07:28:46.000Z",
|
||||
"display_name": "Elden Beedle 🇺🇦 🇫🇷",
|
||||
"emojis": [],
|
||||
"fields": [],
|
||||
"followers_count": 490,
|
||||
"following_count": 367,
|
||||
"fqn": "dave@gleasonator.com",
|
||||
"header": "https://media.gleasonator.com/47e8907c322a0e55d12b211846aa27c6b386e947326fe14bb09c89ef7317901d.jpg",
|
||||
"header_static": "https://media.gleasonator.com/47e8907c322a0e55d12b211846aa27c6b386e947326fe14bb09c89ef7317901d.jpg",
|
||||
"id": "9v5c0Pkz3MT5KTfam8",
|
||||
"last_status_at": "2022-04-16T19:57:10",
|
||||
"locked": false,
|
||||
"note": "Beedle is back, baby!<br/><br/>Mostly just crosspost memes and stuff I find on the internet",
|
||||
"pleroma": {
|
||||
"accepts_chat_messages": true,
|
||||
"also_known_as": [],
|
||||
"ap_id": "https://gleasonator.com/users/dave",
|
||||
"background_image": null,
|
||||
"birthday": "1990-01-01",
|
||||
"deactivated": false,
|
||||
"favicon": "https://gleasonator.com/favicon.png",
|
||||
"hide_favorites": true,
|
||||
"hide_followers": false,
|
||||
"hide_followers_count": false,
|
||||
"hide_follows": false,
|
||||
"hide_follows_count": false,
|
||||
"is_admin": false,
|
||||
"is_confirmed": true,
|
||||
"is_moderator": false,
|
||||
"is_suggested": true,
|
||||
"location": null,
|
||||
"relationship": {},
|
||||
"skip_thread_containment": false,
|
||||
"tags": []
|
||||
},
|
||||
"source": {
|
||||
"fields": [],
|
||||
"note": "Beedle is back, baby!\r\n\r\nMostly just crosspost memes and stuff I find on the internet",
|
||||
"pleroma": {
|
||||
"actor_type": "Person",
|
||||
"discoverable": false
|
||||
},
|
||||
"sensitive": false
|
||||
},
|
||||
"statuses_count": 16758,
|
||||
"url": "https://gleasonator.com/users/dave",
|
||||
"username": "dave"
|
||||
},
|
||||
"created_at": "2022-04-16T16:52:15.000Z",
|
||||
"emoji": "😮",
|
||||
"id": "429071",
|
||||
"pleroma": {
|
||||
"is_muted": false,
|
||||
"is_seen": true
|
||||
},
|
||||
"status": {
|
||||
"account": {
|
||||
"acct": "alex",
|
||||
"avatar": "https://media.gleasonator.com/6d64aecb17348b23aaff78db4687b9476cb0da1c07cc6a819c2e6ec7144c18b1.png",
|
||||
"avatar_static": "https://media.gleasonator.com/6d64aecb17348b23aaff78db4687b9476cb0da1c07cc6a819c2e6ec7144c18b1.png",
|
||||
"bot": false,
|
||||
"created_at": "2020-01-08T01:25:43.000Z",
|
||||
"display_name": "Alex Gleason",
|
||||
"emojis": [],
|
||||
"fields": [
|
||||
{
|
||||
"name": "Website",
|
||||
"value": "<a href=\"https://alexgleason.me\" rel=\"ugc\">https://alexgleason.me</a>"
|
||||
},
|
||||
{
|
||||
"name": "Soapbox",
|
||||
"value": "<a href=\"https://soapbox.pub\" rel=\"ugc\">https://soapbox.pub</a>"
|
||||
},
|
||||
{
|
||||
"name": "Email",
|
||||
"value": "alex@alexgleason.me"
|
||||
},
|
||||
{
|
||||
"name": "Gender identity",
|
||||
"value": "Soyboy"
|
||||
},
|
||||
{
|
||||
"name": "Donate (PayPal)",
|
||||
"value": "<a href=\"https://paypal.me/gleasonator\" rel=\"ugc\">https://paypal.me/gleasonator</a>"
|
||||
},
|
||||
{
|
||||
"name": "$BTC",
|
||||
"value": "bc1q9cx35adpm73aq2fw40ye6ts8hfxqzjr5unwg0n"
|
||||
},
|
||||
{
|
||||
"name": "$ETH",
|
||||
"value": "0xAc9aB5Fc04Dc1cB1789Af75b523Bd23C70B2D717"
|
||||
},
|
||||
{
|
||||
"name": "$DOGE",
|
||||
"value": "D5zVZs6jrRakaPVGiErkQiHt9sayzm6V5D"
|
||||
},
|
||||
{
|
||||
"name": "$XMR",
|
||||
"value": "45JDCLrjJ4bgVUSbbs2yjy9m5Mf4VLPW8fG7jw9sq5u69rXZZopQogZNeyYkMBnXpkaip4p4QwaaJNhdTotPa9g44DBCzdK"
|
||||
}
|
||||
],
|
||||
"follow_requests_count": 0,
|
||||
"followers_count": 2602,
|
||||
"following_count": 1603,
|
||||
"fqn": "alex@gleasonator.com",
|
||||
"header": "https://media.gleasonator.com/accounts/headers/000/000/001/original/9d0e4dbf1c9dbc8f.png",
|
||||
"header_static": "https://media.gleasonator.com/accounts/headers/000/000/001/original/9d0e4dbf1c9dbc8f.png",
|
||||
"id": "9v5bmRalQvjOy0ECcC",
|
||||
"last_status_at": "2022-04-16T19:23:50",
|
||||
"locked": false,
|
||||
"note": "I create Fediverse software that empowers people online.<br/><br/>I'm vegan btw<br/><br/>Note: If you have a question for me, please tag me publicly. This gives the opportunity for others to chime in, and bystanders to learn.",
|
||||
"pleroma": {
|
||||
"accepts_chat_messages": true,
|
||||
"accepts_email_list": true,
|
||||
"allow_following_move": true,
|
||||
"also_known_as": [
|
||||
"https://mitra.social/users/alex"
|
||||
],
|
||||
"ap_id": "https://gleasonator.com/users/alex",
|
||||
"background_image": null,
|
||||
"birthday": "1993-07-03",
|
||||
"deactivated": false,
|
||||
"email": "alex@alexgleason.me",
|
||||
"favicon": "https://gleasonator.com/favicon.png",
|
||||
"hide_favorites": true,
|
||||
"hide_followers": false,
|
||||
"hide_followers_count": false,
|
||||
"hide_follows": false,
|
||||
"hide_follows_count": false,
|
||||
"is_admin": true,
|
||||
"is_confirmed": true,
|
||||
"is_moderator": false,
|
||||
"is_suggested": true,
|
||||
"location": "Texas",
|
||||
"notification_settings": {
|
||||
"block_from_strangers": false,
|
||||
"hide_notification_contents": false
|
||||
},
|
||||
"relationship": {},
|
||||
"skip_thread_containment": false,
|
||||
"tags": [],
|
||||
"unread_conversation_count": 392,
|
||||
"unread_notifications_count": 0
|
||||
},
|
||||
"source": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "Website",
|
||||
"value": "https://alexgleason.me"
|
||||
},
|
||||
{
|
||||
"name": "Soapbox",
|
||||
"value": "https://soapbox.pub"
|
||||
},
|
||||
{
|
||||
"name": "Email",
|
||||
"value": "alex@alexgleason.me"
|
||||
},
|
||||
{
|
||||
"name": "Gender identity",
|
||||
"value": "Soyboy"
|
||||
},
|
||||
{
|
||||
"name": "Donate (PayPal)",
|
||||
"value": "https://paypal.me/gleasonator"
|
||||
},
|
||||
{
|
||||
"name": "$BTC",
|
||||
"value": "bc1q9cx35adpm73aq2fw40ye6ts8hfxqzjr5unwg0n"
|
||||
},
|
||||
{
|
||||
"name": "$ETH",
|
||||
"value": "0xAc9aB5Fc04Dc1cB1789Af75b523Bd23C70B2D717"
|
||||
},
|
||||
{
|
||||
"name": "$DOGE",
|
||||
"value": "D5zVZs6jrRakaPVGiErkQiHt9sayzm6V5D"
|
||||
},
|
||||
{
|
||||
"name": "$XMR",
|
||||
"value": "45JDCLrjJ4bgVUSbbs2yjy9m5Mf4VLPW8fG7jw9sq5u69rXZZopQogZNeyYkMBnXpkaip4p4QwaaJNhdTotPa9g44DBCzdK"
|
||||
}
|
||||
],
|
||||
"note": "I create Fediverse software that empowers people online.\r\n\r\nI'm vegan btw\r\n\r\nNote: If you have a question for me, please tag me publicly. This gives the opportunity for others to chime in, and bystanders to learn.",
|
||||
"pleroma": {
|
||||
"actor_type": "Person",
|
||||
"discoverable": false,
|
||||
"no_rich_text": false,
|
||||
"show_birthday": true,
|
||||
"show_role": true
|
||||
},
|
||||
"privacy": "public",
|
||||
"sensitive": false
|
||||
},
|
||||
"statuses_count": 24050,
|
||||
"url": "https://gleasonator.com/users/alex",
|
||||
"username": "alex"
|
||||
},
|
||||
"application": {
|
||||
"name": "Soapbox FE",
|
||||
"website": "https://soapbox.pub/"
|
||||
},
|
||||
"bookmarked": false,
|
||||
"card": {
|
||||
"author_name": "Kaze Emanuar",
|
||||
"author_url": "https://www.youtube.com/c/KazeEmanuar",
|
||||
"blurhash": null,
|
||||
"description": "",
|
||||
"embed_url": null,
|
||||
"height": 113,
|
||||
"html": "<iframe width=\"200\" height=\"113\" src=\"https://www.youtube.com/embed/t_rzYnXEQlE?feature=oembed\" allowfullscreen=\"\"></iframe>",
|
||||
"image": "https://gleasonator.com/proxy/mI004Vq00johZtAUmMp0fC_XAuM/aHR0cHM6Ly9pLnl0aW1nLmNvbS92aS90X3J6WW5YRVFsRS9ocWRlZmF1bHQuanBn/hqdefault.jpg",
|
||||
"provider_name": "YouTube",
|
||||
"provider_url": "https://www.youtube.com/",
|
||||
"title": "FIXING the ENTIRE SM64 Source Code (INSANE N64 performance)",
|
||||
"type": "video",
|
||||
"url": "https://youtu.be/t_rzYnXEQlE",
|
||||
"width": 200
|
||||
},
|
||||
"content": "<p>Bruh. This guy rewrote the reversed engineered Super Mario 64 code for 10x performance. Games need to be open source. <a href=\"https://youtu.be/t_rzYnXEQlE\">https://youtu.be/t_rzYnXEQlE</a></p>",
|
||||
"created_at": "2022-04-16T16:40:28.000Z",
|
||||
"emojis": [],
|
||||
"favourited": false,
|
||||
"favourites_count": 11,
|
||||
"id": "AIVq6SrJg5yb8eGVsm",
|
||||
"in_reply_to_account_id": null,
|
||||
"in_reply_to_id": null,
|
||||
"language": null,
|
||||
"media_attachments": [],
|
||||
"mentions": [],
|
||||
"muted": false,
|
||||
"pinned": false,
|
||||
"pleroma": {
|
||||
"content": {
|
||||
"text/plain": "Bruh. This guy rewrote the reversed engineered Super Mario 64 code for 10x performance. Games need to be open source. https://youtu.be/t_rzYnXEQlE"
|
||||
},
|
||||
"content_type": null,
|
||||
"conversation_id": "AIVq6SqFk37r5LlfE0",
|
||||
"direct_conversation_id": null,
|
||||
"emoji_reactions": [
|
||||
{
|
||||
"count": 1,
|
||||
"me": false,
|
||||
"name": "❤️"
|
||||
},
|
||||
{
|
||||
"count": 2,
|
||||
"me": false,
|
||||
"name": "😮"
|
||||
},
|
||||
{
|
||||
"count": 1,
|
||||
"me": false,
|
||||
"name": "😆"
|
||||
},
|
||||
{
|
||||
"count": 1,
|
||||
"me": false,
|
||||
"name": "👍🏻"
|
||||
},
|
||||
{
|
||||
"count": 1,
|
||||
"me": false,
|
||||
"name": "🔥"
|
||||
}
|
||||
],
|
||||
"expires_at": null,
|
||||
"in_reply_to_account_acct": null,
|
||||
"local": true,
|
||||
"parent_visible": false,
|
||||
"pinned_at": null,
|
||||
"quote": null,
|
||||
"quote_url": null,
|
||||
"quote_visible": false,
|
||||
"spoiler_text": {
|
||||
"text/plain": ""
|
||||
},
|
||||
"thread_muted": false
|
||||
},
|
||||
"poll": null,
|
||||
"reblog": null,
|
||||
"reblogged": false,
|
||||
"reblogs_count": 7,
|
||||
"replies_count": 2,
|
||||
"sensitive": false,
|
||||
"spoiler_text": "",
|
||||
"tags": [],
|
||||
"text": null,
|
||||
"uri": "https://gleasonator.com/objects/160dcbb2-73bc-4cd2-971e-e7f6a38602a0",
|
||||
"url": "https://gleasonator.com/notice/AIVq6SrJg5yb8eGVsm",
|
||||
"visibility": "public"
|
||||
},
|
||||
"type": "pleroma:emoji_reaction"
|
||||
}
|
202
app/soapbox/__fixtures__/notification-poll.json
Normal file
202
app/soapbox/__fixtures__/notification-poll.json
Normal file
|
@ -0,0 +1,202 @@
|
|||
{
|
||||
"account": {
|
||||
"acct": "dave",
|
||||
"avatar": "https://media.gleasonator.com/68c29c30c18f30dd2898f85466bf1670312dda816617e6d31421c7e4c30a8265.png",
|
||||
"avatar_static": "https://media.gleasonator.com/68c29c30c18f30dd2898f85466bf1670312dda816617e6d31421c7e4c30a8265.png",
|
||||
"bot": false,
|
||||
"created_at": "2020-02-01T07:28:46.000Z",
|
||||
"display_name": "Elden Beedle 🇺🇦 🇫🇷",
|
||||
"emojis": [],
|
||||
"fields": [],
|
||||
"followers_count": 490,
|
||||
"following_count": 367,
|
||||
"fqn": "dave@gleasonator.com",
|
||||
"header": "https://media.gleasonator.com/47e8907c322a0e55d12b211846aa27c6b386e947326fe14bb09c89ef7317901d.jpg",
|
||||
"header_static": "https://media.gleasonator.com/47e8907c322a0e55d12b211846aa27c6b386e947326fe14bb09c89ef7317901d.jpg",
|
||||
"id": "9v5c0Pkz3MT5KTfam8",
|
||||
"last_status_at": "2022-04-16T19:57:10",
|
||||
"locked": false,
|
||||
"note": "Beedle is back, baby!<br/><br/>Mostly just crosspost memes and stuff I find on the internet",
|
||||
"pleroma": {
|
||||
"accepts_chat_messages": true,
|
||||
"also_known_as": [],
|
||||
"ap_id": "https://gleasonator.com/users/dave",
|
||||
"background_image": null,
|
||||
"birthday": "1990-01-01",
|
||||
"deactivated": false,
|
||||
"favicon": "https://gleasonator.com/favicon.png",
|
||||
"hide_favorites": true,
|
||||
"hide_followers": false,
|
||||
"hide_followers_count": false,
|
||||
"hide_follows": false,
|
||||
"hide_follows_count": false,
|
||||
"is_admin": false,
|
||||
"is_confirmed": true,
|
||||
"is_moderator": false,
|
||||
"is_suggested": true,
|
||||
"location": null,
|
||||
"relationship": {},
|
||||
"skip_thread_containment": false,
|
||||
"tags": []
|
||||
},
|
||||
"source": {
|
||||
"fields": [],
|
||||
"note": "Beedle is back, baby!\r\n\r\nMostly just crosspost memes and stuff I find on the internet",
|
||||
"pleroma": {
|
||||
"actor_type": "Person",
|
||||
"discoverable": false
|
||||
},
|
||||
"sensitive": false
|
||||
},
|
||||
"statuses_count": 16758,
|
||||
"url": "https://gleasonator.com/users/dave",
|
||||
"username": "dave"
|
||||
},
|
||||
"created_at": "2022-04-14T01:12:27.000Z",
|
||||
"id": "427339",
|
||||
"pleroma": {
|
||||
"is_muted": false,
|
||||
"is_seen": true
|
||||
},
|
||||
"status": {
|
||||
"account": {
|
||||
"acct": "dave",
|
||||
"avatar": "https://media.gleasonator.com/68c29c30c18f30dd2898f85466bf1670312dda816617e6d31421c7e4c30a8265.png",
|
||||
"avatar_static": "https://media.gleasonator.com/68c29c30c18f30dd2898f85466bf1670312dda816617e6d31421c7e4c30a8265.png",
|
||||
"bot": false,
|
||||
"created_at": "2020-02-01T07:28:46.000Z",
|
||||
"display_name": "Elden Beedle 🇺🇦 🇫🇷",
|
||||
"emojis": [],
|
||||
"fields": [],
|
||||
"followers_count": 490,
|
||||
"following_count": 367,
|
||||
"fqn": "dave@gleasonator.com",
|
||||
"header": "https://media.gleasonator.com/47e8907c322a0e55d12b211846aa27c6b386e947326fe14bb09c89ef7317901d.jpg",
|
||||
"header_static": "https://media.gleasonator.com/47e8907c322a0e55d12b211846aa27c6b386e947326fe14bb09c89ef7317901d.jpg",
|
||||
"id": "9v5c0Pkz3MT5KTfam8",
|
||||
"last_status_at": "2022-04-16T19:57:10",
|
||||
"locked": false,
|
||||
"note": "Beedle is back, baby!<br/><br/>Mostly just crosspost memes and stuff I find on the internet",
|
||||
"pleroma": {
|
||||
"accepts_chat_messages": true,
|
||||
"also_known_as": [],
|
||||
"ap_id": "https://gleasonator.com/users/dave",
|
||||
"background_image": null,
|
||||
"birthday": "1990-01-01",
|
||||
"deactivated": false,
|
||||
"favicon": "https://gleasonator.com/favicon.png",
|
||||
"hide_favorites": true,
|
||||
"hide_followers": false,
|
||||
"hide_followers_count": false,
|
||||
"hide_follows": false,
|
||||
"hide_follows_count": false,
|
||||
"is_admin": false,
|
||||
"is_confirmed": true,
|
||||
"is_moderator": false,
|
||||
"is_suggested": true,
|
||||
"location": null,
|
||||
"relationship": {},
|
||||
"skip_thread_containment": false,
|
||||
"tags": []
|
||||
},
|
||||
"source": {
|
||||
"fields": [],
|
||||
"note": "Beedle is back, baby!\r\n\r\nMostly just crosspost memes and stuff I find on the internet",
|
||||
"pleroma": {
|
||||
"actor_type": "Person",
|
||||
"discoverable": false
|
||||
},
|
||||
"sensitive": false
|
||||
},
|
||||
"statuses_count": 16758,
|
||||
"url": "https://gleasonator.com/users/dave",
|
||||
"username": "dave"
|
||||
},
|
||||
"application": {
|
||||
"name": "Soapbox FE",
|
||||
"website": "https://soapbox.pub/"
|
||||
},
|
||||
"bookmarked": false,
|
||||
"card": null,
|
||||
"content": "<p>Focusing on just the look, what do you guys think?</p>",
|
||||
"created_at": "2022-04-13T01:12:26.000Z",
|
||||
"emojis": [],
|
||||
"favourited": false,
|
||||
"favourites_count": 1,
|
||||
"id": "AIOHjtGEaqUHoXGVf6",
|
||||
"in_reply_to_account_id": "9v5c0Pkz3MT5KTfam8",
|
||||
"in_reply_to_id": "AIOFTLqQrljhdNBNHE",
|
||||
"language": null,
|
||||
"media_attachments": [],
|
||||
"mentions": [
|
||||
{
|
||||
"acct": "dave",
|
||||
"id": "9v5c0Pkz3MT5KTfam8",
|
||||
"url": "https://gleasonator.com/users/dave",
|
||||
"username": "dave"
|
||||
}
|
||||
],
|
||||
"muted": false,
|
||||
"pinned": false,
|
||||
"pleroma": {
|
||||
"content": {
|
||||
"text/plain": "Focusing on just the look, what do you guys think?"
|
||||
},
|
||||
"content_type": null,
|
||||
"conversation_id": "AIOFTLp0x2bNYyWF4C",
|
||||
"direct_conversation_id": null,
|
||||
"emoji_reactions": [],
|
||||
"expires_at": null,
|
||||
"in_reply_to_account_acct": "dave",
|
||||
"local": true,
|
||||
"parent_visible": true,
|
||||
"pinned_at": null,
|
||||
"quote": null,
|
||||
"quote_url": null,
|
||||
"quote_visible": false,
|
||||
"spoiler_text": {
|
||||
"text/plain": ""
|
||||
},
|
||||
"thread_muted": false
|
||||
},
|
||||
"poll": {
|
||||
"emojis": [],
|
||||
"expired": true,
|
||||
"expires_at": "2022-04-14T01:12:26.000Z",
|
||||
"id": "AIOHjtAuucEZY2mGNE",
|
||||
"multiple": false,
|
||||
"options": [
|
||||
{
|
||||
"title": "Looks good, looking forward to wider deployment",
|
||||
"votes_count": 10
|
||||
},
|
||||
{
|
||||
"title": "Not a fan, l'll stick to the current UI thanks",
|
||||
"votes_count": 1
|
||||
},
|
||||
{
|
||||
"title": "Hard to say, need to actually try to decide honestly",
|
||||
"votes_count": 1
|
||||
}
|
||||
],
|
||||
"own_votes": [
|
||||
0
|
||||
],
|
||||
"voted": true,
|
||||
"voters_count": 12,
|
||||
"votes_count": 12
|
||||
},
|
||||
"reblog": null,
|
||||
"reblogged": false,
|
||||
"reblogs_count": 1,
|
||||
"replies_count": 1,
|
||||
"sensitive": false,
|
||||
"spoiler_text": "",
|
||||
"tags": [],
|
||||
"text": null,
|
||||
"uri": "https://gleasonator.com/objects/a8465271-a48d-4c39-a0a9-d3eda3ab2735",
|
||||
"url": "https://gleasonator.com/notice/AIOHjtGEaqUHoXGVf6",
|
||||
"visibility": "public"
|
||||
},
|
||||
"type": "poll"
|
||||
}
|
284
app/soapbox/__fixtures__/notification-reblog.json
Normal file
284
app/soapbox/__fixtures__/notification-reblog.json
Normal file
|
@ -0,0 +1,284 @@
|
|||
{
|
||||
"account": {
|
||||
"acct": "rob@nicecrew.digital",
|
||||
"avatar": "https://gleasonator.com/proxy/RcEgR4-0InIpw_sCpDWV-XrAbmY/aHR0cHM6Ly9uaWNlY3Jldy5kaWdpdGFsL21lZGlhL2M0MTllMTk1Nzg0MmEzMTY5M2MzNDExNTZlMTBhNmQwMTY2ZTM5YzQzM2ExZTczMmVmYWNlYmJkYjAyMDYzZjEucG5n/c419e1957842a31693c341156e10a6d0166e39c433a1e732efacebbdb02063f1.png",
|
||||
"avatar_static": "https://gleasonator.com/proxy/RcEgR4-0InIpw_sCpDWV-XrAbmY/aHR0cHM6Ly9uaWNlY3Jldy5kaWdpdGFsL21lZGlhL2M0MTllMTk1Nzg0MmEzMTY5M2MzNDExNTZlMTBhNmQwMTY2ZTM5YzQzM2ExZTczMmVmYWNlYmJkYjAyMDYzZjEucG5n/c419e1957842a31693c341156e10a6d0166e39c433a1e732efacebbdb02063f1.png",
|
||||
"bot": false,
|
||||
"created_at": "2022-03-10T12:30:41.000Z",
|
||||
"display_name": "Rob Colbert",
|
||||
"emojis": [],
|
||||
"fields": [
|
||||
{
|
||||
"name": "Shing.tv",
|
||||
"value": "<a href=\"https://shing.tv\" rel=\"ugc\">https://shing.tv</a>"
|
||||
},
|
||||
{
|
||||
"name": "LibertyLinks",
|
||||
"value": "<a href=\"https://libertylinks.io\" rel=\"ugc\">https://libertylinks.io</a>"
|
||||
},
|
||||
{
|
||||
"name": "GiveSendGo",
|
||||
"value": "<a href=\"https://givesendgo.com/dtp\" rel=\"ugc\">https://givesendgo.com/dtp</a>"
|
||||
}
|
||||
],
|
||||
"followers_count": 0,
|
||||
"following_count": 0,
|
||||
"fqn": "rob@nicecrew.digital",
|
||||
"header": "https://gleasonator.com/proxy/t4--aro68-XZlasaR2bYiuiZMcA/aHR0cHM6Ly9uaWNlY3Jldy5kaWdpdGFsL21lZGlhL2E5ODYzYWE4YjEzM2QwMzkxNmU1N2MzNDgzMzBhZmE5MTM5MDFlNGZiMDEwYjk1Y2FiZjlmYmZiZTA4N2QxODMucG5n/a9863aa8b133d03916e57c348330afa913901e4fb010b95cabf9fbfbe087d183.png",
|
||||
"header_static": "https://gleasonator.com/proxy/t4--aro68-XZlasaR2bYiuiZMcA/aHR0cHM6Ly9uaWNlY3Jldy5kaWdpdGFsL21lZGlhL2E5ODYzYWE4YjEzM2QwMzkxNmU1N2MzNDgzMzBhZmE5MTM5MDFlNGZiMDEwYjk1Y2FiZjlmYmZiZTA4N2QxODMucG5n/a9863aa8b133d03916e57c348330afa913901e4fb010b95cabf9fbfbe087d183.png",
|
||||
"id": "AHGmnebARD1aa1IiBc",
|
||||
"last_status_at": "2022-04-16T21:08:35",
|
||||
"locked": false,
|
||||
"note": "Creator and CTO of the Digital Telepresence Platform and DTP Technologies, LLC.",
|
||||
"pleroma": {
|
||||
"accepts_chat_messages": true,
|
||||
"also_known_as": [],
|
||||
"ap_id": "https://nicecrew.digital/users/rob",
|
||||
"background_image": null,
|
||||
"deactivated": false,
|
||||
"favicon": "https://gleasonator.com/proxy/gb2NPo0Kv_svADN1_J9_9iSwlrY/aHR0cHM6Ly9uaWNlY3Jldy5kaWdpdGFsL2Zhdmljb24ucG5n/favicon.png",
|
||||
"hide_favorites": true,
|
||||
"hide_followers": true,
|
||||
"hide_followers_count": false,
|
||||
"hide_follows": true,
|
||||
"hide_follows_count": false,
|
||||
"is_admin": false,
|
||||
"is_confirmed": true,
|
||||
"is_moderator": false,
|
||||
"is_suggested": false,
|
||||
"location": null,
|
||||
"relationship": {},
|
||||
"skip_thread_containment": false,
|
||||
"tags": []
|
||||
},
|
||||
"source": {
|
||||
"fields": [],
|
||||
"note": "",
|
||||
"pleroma": {
|
||||
"actor_type": "Person",
|
||||
"discoverable": false
|
||||
},
|
||||
"sensitive": false
|
||||
},
|
||||
"statuses_count": 761,
|
||||
"url": "https://nicecrew.digital/users/rob",
|
||||
"username": "rob"
|
||||
},
|
||||
"created_at": "2022-04-16T03:43:24.000Z",
|
||||
"id": "428608",
|
||||
"pleroma": {
|
||||
"is_muted": false,
|
||||
"is_seen": true
|
||||
},
|
||||
"status": {
|
||||
"account": {
|
||||
"acct": "alex",
|
||||
"avatar": "https://media.gleasonator.com/6d64aecb17348b23aaff78db4687b9476cb0da1c07cc6a819c2e6ec7144c18b1.png",
|
||||
"avatar_static": "https://media.gleasonator.com/6d64aecb17348b23aaff78db4687b9476cb0da1c07cc6a819c2e6ec7144c18b1.png",
|
||||
"bot": false,
|
||||
"created_at": "2020-01-08T01:25:43.000Z",
|
||||
"display_name": "Alex Gleason",
|
||||
"emojis": [],
|
||||
"fields": [
|
||||
{
|
||||
"name": "Website",
|
||||
"value": "<a href=\"https://alexgleason.me\" rel=\"ugc\">https://alexgleason.me</a>"
|
||||
},
|
||||
{
|
||||
"name": "Soapbox",
|
||||
"value": "<a href=\"https://soapbox.pub\" rel=\"ugc\">https://soapbox.pub</a>"
|
||||
},
|
||||
{
|
||||
"name": "Email",
|
||||
"value": "alex@alexgleason.me"
|
||||
},
|
||||
{
|
||||
"name": "Gender identity",
|
||||
"value": "Soyboy"
|
||||
},
|
||||
{
|
||||
"name": "Donate (PayPal)",
|
||||
"value": "<a href=\"https://paypal.me/gleasonator\" rel=\"ugc\">https://paypal.me/gleasonator</a>"
|
||||
},
|
||||
{
|
||||
"name": "$BTC",
|
||||
"value": "bc1q9cx35adpm73aq2fw40ye6ts8hfxqzjr5unwg0n"
|
||||
},
|
||||
{
|
||||
"name": "$ETH",
|
||||
"value": "0xAc9aB5Fc04Dc1cB1789Af75b523Bd23C70B2D717"
|
||||
},
|
||||
{
|
||||
"name": "$DOGE",
|
||||
"value": "D5zVZs6jrRakaPVGiErkQiHt9sayzm6V5D"
|
||||
},
|
||||
{
|
||||
"name": "$XMR",
|
||||
"value": "45JDCLrjJ4bgVUSbbs2yjy9m5Mf4VLPW8fG7jw9sq5u69rXZZopQogZNeyYkMBnXpkaip4p4QwaaJNhdTotPa9g44DBCzdK"
|
||||
}
|
||||
],
|
||||
"follow_requests_count": 0,
|
||||
"followers_count": 2602,
|
||||
"following_count": 1603,
|
||||
"fqn": "alex@gleasonator.com",
|
||||
"header": "https://media.gleasonator.com/accounts/headers/000/000/001/original/9d0e4dbf1c9dbc8f.png",
|
||||
"header_static": "https://media.gleasonator.com/accounts/headers/000/000/001/original/9d0e4dbf1c9dbc8f.png",
|
||||
"id": "9v5bmRalQvjOy0ECcC",
|
||||
"last_status_at": "2022-04-16T19:23:50",
|
||||
"locked": false,
|
||||
"note": "I create Fediverse software that empowers people online.<br/><br/>I'm vegan btw<br/><br/>Note: If you have a question for me, please tag me publicly. This gives the opportunity for others to chime in, and bystanders to learn.",
|
||||
"pleroma": {
|
||||
"accepts_chat_messages": true,
|
||||
"accepts_email_list": true,
|
||||
"allow_following_move": true,
|
||||
"also_known_as": [
|
||||
"https://mitra.social/users/alex"
|
||||
],
|
||||
"ap_id": "https://gleasonator.com/users/alex",
|
||||
"background_image": null,
|
||||
"birthday": "1993-07-03",
|
||||
"deactivated": false,
|
||||
"email": "alex@alexgleason.me",
|
||||
"favicon": "https://gleasonator.com/favicon.png",
|
||||
"hide_favorites": true,
|
||||
"hide_followers": false,
|
||||
"hide_followers_count": false,
|
||||
"hide_follows": false,
|
||||
"hide_follows_count": false,
|
||||
"is_admin": true,
|
||||
"is_confirmed": true,
|
||||
"is_moderator": false,
|
||||
"is_suggested": true,
|
||||
"location": "Texas",
|
||||
"notification_settings": {
|
||||
"block_from_strangers": false,
|
||||
"hide_notification_contents": false
|
||||
},
|
||||
"relationship": {},
|
||||
"skip_thread_containment": false,
|
||||
"tags": [],
|
||||
"unread_conversation_count": 392,
|
||||
"unread_notifications_count": 0
|
||||
},
|
||||
"source": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "Website",
|
||||
"value": "https://alexgleason.me"
|
||||
},
|
||||
{
|
||||
"name": "Soapbox",
|
||||
"value": "https://soapbox.pub"
|
||||
},
|
||||
{
|
||||
"name": "Email",
|
||||
"value": "alex@alexgleason.me"
|
||||
},
|
||||
{
|
||||
"name": "Gender identity",
|
||||
"value": "Soyboy"
|
||||
},
|
||||
{
|
||||
"name": "Donate (PayPal)",
|
||||
"value": "https://paypal.me/gleasonator"
|
||||
},
|
||||
{
|
||||
"name": "$BTC",
|
||||
"value": "bc1q9cx35adpm73aq2fw40ye6ts8hfxqzjr5unwg0n"
|
||||
},
|
||||
{
|
||||
"name": "$ETH",
|
||||
"value": "0xAc9aB5Fc04Dc1cB1789Af75b523Bd23C70B2D717"
|
||||
},
|
||||
{
|
||||
"name": "$DOGE",
|
||||
"value": "D5zVZs6jrRakaPVGiErkQiHt9sayzm6V5D"
|
||||
},
|
||||
{
|
||||
"name": "$XMR",
|
||||
"value": "45JDCLrjJ4bgVUSbbs2yjy9m5Mf4VLPW8fG7jw9sq5u69rXZZopQogZNeyYkMBnXpkaip4p4QwaaJNhdTotPa9g44DBCzdK"
|
||||
}
|
||||
],
|
||||
"note": "I create Fediverse software that empowers people online.\r\n\r\nI'm vegan btw\r\n\r\nNote: If you have a question for me, please tag me publicly. This gives the opportunity for others to chime in, and bystanders to learn.",
|
||||
"pleroma": {
|
||||
"actor_type": "Person",
|
||||
"discoverable": false,
|
||||
"no_rich_text": false,
|
||||
"show_birthday": true,
|
||||
"show_role": true
|
||||
},
|
||||
"privacy": "public",
|
||||
"sensitive": false
|
||||
},
|
||||
"statuses_count": 24050,
|
||||
"url": "https://gleasonator.com/users/alex",
|
||||
"username": "alex"
|
||||
},
|
||||
"application": {
|
||||
"name": "Soapbox FE",
|
||||
"website": "https://soapbox.pub/"
|
||||
},
|
||||
"bookmarked": false,
|
||||
"card": null,
|
||||
"content": "<p>The <span class=\"h-card\"><a class=\"u-url mention\" data-user=\"9v5boQSsaxVc3AU8u0\" href=\"https://status.fsf.org/fsf\" rel=\"ugc\">@<span>fsf</span></a></span> needs to give out an award to every American who has never downloaded TikTok.</p>",
|
||||
"created_at": "2022-04-16T03:42:50.000Z",
|
||||
"emojis": [],
|
||||
"favourited": false,
|
||||
"favourites_count": 15,
|
||||
"id": "AIUihbqUEe5Uvv7P9s",
|
||||
"in_reply_to_account_id": null,
|
||||
"in_reply_to_id": null,
|
||||
"language": null,
|
||||
"media_attachments": [],
|
||||
"mentions": [
|
||||
{
|
||||
"acct": "fsf@status.fsf.org",
|
||||
"id": "9v5boQSsaxVc3AU8u0",
|
||||
"url": "https://status.fsf.org/fsf",
|
||||
"username": "fsf"
|
||||
}
|
||||
],
|
||||
"muted": false,
|
||||
"pinned": false,
|
||||
"pleroma": {
|
||||
"content": {
|
||||
"text/plain": "The @fsf needs to give out an award to every American who has never downloaded TikTok."
|
||||
},
|
||||
"content_type": null,
|
||||
"conversation_id": "AIUihbp4JuxArWSGwq",
|
||||
"direct_conversation_id": null,
|
||||
"emoji_reactions": [
|
||||
{
|
||||
"count": 2,
|
||||
"me": false,
|
||||
"name": "🔥"
|
||||
}
|
||||
],
|
||||
"expires_at": null,
|
||||
"in_reply_to_account_acct": null,
|
||||
"local": true,
|
||||
"parent_visible": false,
|
||||
"pinned_at": null,
|
||||
"quote": null,
|
||||
"quote_url": null,
|
||||
"quote_visible": false,
|
||||
"spoiler_text": {
|
||||
"text/plain": ""
|
||||
},
|
||||
"thread_muted": false
|
||||
},
|
||||
"poll": null,
|
||||
"reblog": null,
|
||||
"reblogged": false,
|
||||
"reblogs_count": 8,
|
||||
"replies_count": 4,
|
||||
"sensitive": false,
|
||||
"spoiler_text": "",
|
||||
"tags": [],
|
||||
"text": null,
|
||||
"uri": "https://gleasonator.com/objects/6be95787-fb9c-41cd-96cf-9652b2680863",
|
||||
"url": "https://gleasonator.com/notice/AIUihbqUEe5Uvv7P9s",
|
||||
"visibility": "public"
|
||||
},
|
||||
"type": "reblog"
|
||||
}
|
17
app/soapbox/__fixtures__/patron-instance.json
Normal file
17
app/soapbox/__fixtures__/patron-instance.json
Normal file
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"funding": {
|
||||
"amount": 3500,
|
||||
"patrons": 3,
|
||||
"currency": "usd",
|
||||
"interval": "monthly"
|
||||
},
|
||||
"goals": [
|
||||
{
|
||||
"amount": 20000,
|
||||
"currency": "usd",
|
||||
"interval": "monthly",
|
||||
"text": "I'll be able to afford an avocado."
|
||||
}
|
||||
],
|
||||
"url": "https://patron.gleasonator.com"
|
||||
}
|
4
app/soapbox/__fixtures__/patron-user.json
Normal file
4
app/soapbox/__fixtures__/patron-user.json
Normal file
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"is_patron": true,
|
||||
"url": "https://gleasonator.com/users/dave"
|
||||
}
|
66
app/soapbox/__fixtures__/pixelfed-instance.json
Normal file
66
app/soapbox/__fixtures__/pixelfed-instance.json
Normal file
|
@ -0,0 +1,66 @@
|
|||
{
|
||||
"uri": "pixelfed.social",
|
||||
"title": "pixelfed",
|
||||
"short_description": "Pixelfed is an image sharing platform, an ethical alternative to centralized platforms",
|
||||
"description": "Pixelfed is an image sharing platform, an ethical alternative to centralized platforms",
|
||||
"email": "hello@pixelfed.org",
|
||||
"version": "2.7.2 (compatible; Pixelfed 0.11.2)",
|
||||
"urls": {
|
||||
"streaming_api": "wss://pixelfed.social"
|
||||
},
|
||||
"stats": {
|
||||
"user_count": 45061,
|
||||
"status_count": 301357,
|
||||
"domain_count": 5028
|
||||
},
|
||||
"thumbnail": "https://pixelfed.social/img/pixelfed-icon-color.png",
|
||||
"languages": [
|
||||
"en"
|
||||
],
|
||||
"registrations": true,
|
||||
"approval_required": false,
|
||||
"contact_account": {
|
||||
"id": "1",
|
||||
"username": "admin",
|
||||
"acct": "admin",
|
||||
"display_name": "Admin",
|
||||
"discoverable": true,
|
||||
"locked": false,
|
||||
"followers_count": 419,
|
||||
"following_count": 2,
|
||||
"statuses_count": 6,
|
||||
"note": "pixelfed.social Admin. Managed by @dansup",
|
||||
"url": "https://pixelfed.social/admin",
|
||||
"avatar": "https://pixelfed.social/storage/avatars/000/000/000/001/LSHNCgwbby7wu3iCYV6H_avatar.png?v=4",
|
||||
"created_at": "2018-06-01T03:54:08.000000Z",
|
||||
"avatar_static": "https://pixelfed.social/storage/avatars/000/000/000/001/LSHNCgwbby7wu3iCYV6H_avatar.png?v=4",
|
||||
"bot": false,
|
||||
"emojis": [],
|
||||
"fields": [],
|
||||
"header": "https://pixelfed.social/storage/headers/missing.png",
|
||||
"header_static": "https://pixelfed.social/storage/headers/missing.png",
|
||||
"last_status_at": null
|
||||
},
|
||||
"rules": [
|
||||
{
|
||||
"id": "1",
|
||||
"text": "Sexually explicit or violent media must be marked as sensitive when posting"
|
||||
},
|
||||
{
|
||||
"id": "2",
|
||||
"text": "No racism, sexism, homophobia, transphobia, xenophobia, or casteism"
|
||||
},
|
||||
{
|
||||
"id": "3",
|
||||
"text": "No incitement of violence or promotion of violent ideologies"
|
||||
},
|
||||
{
|
||||
"id": "4",
|
||||
"text": "No harassment, dogpiling or doxxing of other users"
|
||||
},
|
||||
{
|
||||
"id": "5",
|
||||
"text": "No content illegal in United States"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,108 @@
|
|||
{
|
||||
"account": {
|
||||
"acct": "alex",
|
||||
"avatar": "https://freespeechextremist.com/images/avi.png",
|
||||
"avatar_static": "https://freespeechextremist.com/images/avi.png",
|
||||
"bot": false,
|
||||
"created_at": "2022-02-28T01:55:05.000Z",
|
||||
"display_name": "Alex Gleason",
|
||||
"emojis": [],
|
||||
"fields": [],
|
||||
"followers_count": 1,
|
||||
"following_count": 0,
|
||||
"header": "https://freespeechextremist.com/images/banner.png",
|
||||
"header_static": "https://freespeechextremist.com/images/banner.png",
|
||||
"id": "AGv8wCadU7DqWgMqNk",
|
||||
"locked": false,
|
||||
"note": "I'm testing out compatibility with an older Pleroma version",
|
||||
"pleroma": {
|
||||
"accepts_chat_messages": true,
|
||||
"ap_id": "https://freespeechextremist.com/users/alex",
|
||||
"background_image": null,
|
||||
"confirmation_pending": false,
|
||||
"favicon": null,
|
||||
"hide_favorites": true,
|
||||
"hide_followers": false,
|
||||
"hide_followers_count": false,
|
||||
"hide_follows": false,
|
||||
"hide_follows_count": false,
|
||||
"is_admin": false,
|
||||
"is_moderator": false,
|
||||
"relationship": {},
|
||||
"skip_thread_containment": false,
|
||||
"tags": []
|
||||
},
|
||||
"source": {
|
||||
"fields": [],
|
||||
"note": "I'm testing out compatibility with an older Pleroma version",
|
||||
"pleroma": {
|
||||
"actor_type": "Person",
|
||||
"discoverable": true
|
||||
},
|
||||
"sensitive": false
|
||||
},
|
||||
"statuses_count": 1,
|
||||
"url": "https://freespeechextremist.com/users/alex",
|
||||
"username": "alex"
|
||||
},
|
||||
"application": {
|
||||
"name": "Web",
|
||||
"website": null
|
||||
},
|
||||
"bookmarked": false,
|
||||
"card": null,
|
||||
"content": "<br/><a href=\"https://freespeechextremist.com/media/3e34b808-1c84-4ef3-ba56-67cc86b7911a/0f66e92f339705ccc03079b8f647048e15730adf2cc9eaa1071c7c7cf6884b1b.webm?name=0f66e92f339705ccc03079b8f647048e15730adf2cc9eaa1071c7c7cf6884b1b.webm\">0f66e92f339705ccc03079b8f647048e15730adf2cc9eaa1071c7c7cf6884b1b.webm</a>",
|
||||
"created_at": "2022-04-14T19:42:48.000Z",
|
||||
"emojis": [],
|
||||
"favourited": false,
|
||||
"favourites_count": 0,
|
||||
"id": "AIRxLeIzncpCtsr2hs",
|
||||
"in_reply_to_account_id": null,
|
||||
"in_reply_to_id": null,
|
||||
"language": null,
|
||||
"media_attachments": [
|
||||
{
|
||||
"description": "0f66e92f339705ccc03079b8f647048e15730adf2cc9eaa1071c7c7cf6884b1b.webm",
|
||||
"id": "1142674091",
|
||||
"pleroma": {
|
||||
"mime_type": "video/webm"
|
||||
},
|
||||
"preview_url": "https://freespeechextremist.com/media/3e34b808-1c84-4ef3-ba56-67cc86b7911a/0f66e92f339705ccc03079b8f647048e15730adf2cc9eaa1071c7c7cf6884b1b.webm?name=0f66e92f339705ccc03079b8f647048e15730adf2cc9eaa1071c7c7cf6884b1b.webm",
|
||||
"remote_url": "https://freespeechextremist.com/media/3e34b808-1c84-4ef3-ba56-67cc86b7911a/0f66e92f339705ccc03079b8f647048e15730adf2cc9eaa1071c7c7cf6884b1b.webm?name=0f66e92f339705ccc03079b8f647048e15730adf2cc9eaa1071c7c7cf6884b1b.webm",
|
||||
"text_url": "https://freespeechextremist.com/media/3e34b808-1c84-4ef3-ba56-67cc86b7911a/0f66e92f339705ccc03079b8f647048e15730adf2cc9eaa1071c7c7cf6884b1b.webm?name=0f66e92f339705ccc03079b8f647048e15730adf2cc9eaa1071c7c7cf6884b1b.webm",
|
||||
"type": "video",
|
||||
"url": "https://freespeechextremist.com/media/3e34b808-1c84-4ef3-ba56-67cc86b7911a/0f66e92f339705ccc03079b8f647048e15730adf2cc9eaa1071c7c7cf6884b1b.webm?name=0f66e92f339705ccc03079b8f647048e15730adf2cc9eaa1071c7c7cf6884b1b.webm"
|
||||
}
|
||||
],
|
||||
"mentions": [],
|
||||
"muted": false,
|
||||
"pinned": false,
|
||||
"pleroma": {
|
||||
"content": {
|
||||
"text/plain": "0f66e92f339705ccc03079b8f647048e15730adf2cc9eaa1071c7c7cf6884b1b.webm"
|
||||
},
|
||||
"conversation_id": 97191096,
|
||||
"direct_conversation_id": null,
|
||||
"emoji_reactions": [],
|
||||
"expires_at": null,
|
||||
"in_reply_to_account_acct": null,
|
||||
"local": true,
|
||||
"parent_visible": false,
|
||||
"spoiler_text": {
|
||||
"text/plain": ""
|
||||
},
|
||||
"thread_muted": false
|
||||
},
|
||||
"poll": null,
|
||||
"reblog": null,
|
||||
"reblogged": false,
|
||||
"reblogs_count": 0,
|
||||
"replies_count": 0,
|
||||
"sensitive": false,
|
||||
"spoiler_text": "",
|
||||
"tags": [],
|
||||
"text": null,
|
||||
"uri": "https://freespeechextremist.com/objects/419b2cad-656a-4dbc-b2b5-94bb75e0afc8",
|
||||
"url": "https://freespeechextremist.com/notice/AIRxLeIzncpCtsr2hs",
|
||||
"visibility": "public"
|
||||
}
|
119
app/soapbox/__fixtures__/spinster-soapbox.json
Normal file
119
app/soapbox/__fixtures__/spinster-soapbox.json
Normal file
|
@ -0,0 +1,119 @@
|
|||
{
|
||||
"allowedEmoji": [
|
||||
"👍",
|
||||
"❤️",
|
||||
"😆",
|
||||
"😮",
|
||||
"😢",
|
||||
"😡",
|
||||
"😩"
|
||||
],
|
||||
"brandColor": "#990099",
|
||||
"copyright": "♡2021. Copying is an act of love. Please copy and share.",
|
||||
"cryptoAddresses": [
|
||||
{
|
||||
"address": "bc1qv7lk3algpfg4zpyuhvxfm0uza9ck4parz3y3l5",
|
||||
"note": "",
|
||||
"ticker": "btc"
|
||||
},
|
||||
{
|
||||
"address": "0xadc66B63bFee7677CD27CFb81b16a8860f1A1226",
|
||||
"note": "",
|
||||
"ticker": "eth"
|
||||
},
|
||||
{
|
||||
"address": "DSf7UmRf7DGGsjh4QYhzQaqtjJMTXZ8k79",
|
||||
"note": "",
|
||||
"ticker": "doge"
|
||||
},
|
||||
{
|
||||
"address": "ltc1q642pnkuvw0gpuuvddw6vafvl9hhp3efyl9mnqz",
|
||||
"note": "",
|
||||
"ticker": "ltc"
|
||||
},
|
||||
{
|
||||
"address": "t1faHDsoa4bd3pGaLjaU7DiuUtBPzbnEEse",
|
||||
"note": "",
|
||||
"ticker": "zec"
|
||||
},
|
||||
{
|
||||
"address": "XchTLkcSMsDoZGESwr4tqtxSU5dideAZVQ",
|
||||
"note": "",
|
||||
"ticker": "dash"
|
||||
},
|
||||
{
|
||||
"address": "bitcoincash:qp8f80z27294phmhdk55yf05p3f0tkxl4v9r2aavw5",
|
||||
"note": "",
|
||||
"ticker": "bch"
|
||||
}
|
||||
],
|
||||
"cryptoDonatePanel": {
|
||||
"limit": 1
|
||||
},
|
||||
"customCss": [
|
||||
"/instance/spinster.css"
|
||||
],
|
||||
"defaultSettings": {
|
||||
"autoPlayGif": false,
|
||||
"themeMode": "light"
|
||||
},
|
||||
"extensions": {
|
||||
"patron": {
|
||||
"enabled": true
|
||||
}
|
||||
},
|
||||
"logo": "https://spinster.xyz/instance/images/spinster-logo.svg",
|
||||
"navlinks": {
|
||||
"homeFooter": [
|
||||
{
|
||||
"title": "About",
|
||||
"url": "/about"
|
||||
},
|
||||
{
|
||||
"title": "Terms of Service",
|
||||
"url": "/about/tos"
|
||||
},
|
||||
{
|
||||
"title": "Privacy Policy",
|
||||
"url": "/about/privacy"
|
||||
},
|
||||
{
|
||||
"title": "DMCA",
|
||||
"url": "/about/dmca"
|
||||
},
|
||||
{
|
||||
"title": "Source Code",
|
||||
"url": "/about#opensource"
|
||||
}
|
||||
]
|
||||
},
|
||||
"promoPanel": {
|
||||
"items": [
|
||||
{
|
||||
"icon": "shopping-basket",
|
||||
"text": "Buy Spinster Merch",
|
||||
"url": "https://shop.4w.pub/collections/spinster"
|
||||
},
|
||||
{
|
||||
"icon": "eye-slash",
|
||||
"text": "Privacy Guide",
|
||||
"url": "https://4w.pub/your-guide-to-spinster-privacy-options/"
|
||||
},
|
||||
{
|
||||
"icon": "question-circle",
|
||||
"text": "Spinster FAQs",
|
||||
"url": "https://spinster.xyz/about#faqs"
|
||||
},
|
||||
{
|
||||
"icon": "bug",
|
||||
"text": "Report a Bug",
|
||||
"url": "https://gitlab.com/soapbox-pub/soapbox-fe/-/issues/"
|
||||
},
|
||||
{
|
||||
"icon": "fediverse",
|
||||
"text": "About the Fediverse",
|
||||
"url": "https://jointhefedi.com/"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
|
@ -0,0 +1,95 @@
|
|||
{
|
||||
"id": "108046244464677537",
|
||||
"created_at": "2022-03-30T15:40:53.287Z",
|
||||
"in_reply_to_id": null,
|
||||
"in_reply_to_account_id": null,
|
||||
"sensitive": false,
|
||||
"spoiler_text": "",
|
||||
"visibility": "public",
|
||||
"language": null,
|
||||
"uri": "https://truthsocial.com/users/alex/statuses/108046244464677537",
|
||||
"url": "https://truthsocial.com/@alex/108046244464677537",
|
||||
"replies_count": 0,
|
||||
"reblogs_count": 0,
|
||||
"favourites_count": 0,
|
||||
"favourited": false,
|
||||
"reblogged": false,
|
||||
"muted": false,
|
||||
"bookmarked": false,
|
||||
"pinned": false,
|
||||
"content": "",
|
||||
"reblog": null,
|
||||
"application": {
|
||||
"name": "Soapbox FE",
|
||||
"website": "https://soapbox.pub/"
|
||||
},
|
||||
"account": {
|
||||
"id": "107759994408336377",
|
||||
"username": "alex",
|
||||
"acct": "alex",
|
||||
"display_name": "Alex Gleason",
|
||||
"locked": false,
|
||||
"bot": false,
|
||||
"discoverable": null,
|
||||
"group": false,
|
||||
"created_at": "2022-02-08T00:00:00.000Z",
|
||||
"note": "<p>Launching Truth Social</p>",
|
||||
"url": "https://truthsocial.com/@alex",
|
||||
"avatar": "https://static-assets.truthsocial.com/tmtg:prime-truth-social-assets/accounts/avatars/107/759/994/408/336/377/original/119cb0dd1fa615b7.png",
|
||||
"avatar_static": "https://static-assets.truthsocial.com/tmtg:prime-truth-social-assets/accounts/avatars/107/759/994/408/336/377/original/119cb0dd1fa615b7.png",
|
||||
"header": "https://static-assets.truthsocial.com/tmtg:prime-truth-social-assets/accounts/headers/107/759/994/408/336/377/original/31f62b0453ccf554.png",
|
||||
"header_static": "https://static-assets.truthsocial.com/tmtg:prime-truth-social-assets/accounts/headers/107/759/994/408/336/377/original/31f62b0453ccf554.png",
|
||||
"followers_count": 4713,
|
||||
"following_count": 43,
|
||||
"statuses_count": 7,
|
||||
"last_status_at": "2022-03-30",
|
||||
"verified": true,
|
||||
"location": "Texas",
|
||||
"website": "https://soapbox.pub/",
|
||||
"emojis": [],
|
||||
"fields": []
|
||||
},
|
||||
"media_attachments": [
|
||||
{
|
||||
"id": "108046243948255335",
|
||||
"type": "video",
|
||||
"url": "https://static-assets.truthsocial.com/tmtg:prime-truth-social-assets/media_attachments/files/108/046/243/948/255/335/original/3b17ce701c0d6f08.mp4",
|
||||
"preview_url": "https://static-assets.truthsocial.com/tmtg:prime-truth-social-assets/cache/preview_cards/images/000/543/912/original/e1fcf6ace01d9ded.jpg",
|
||||
"external_video_id": "vwfnq9",
|
||||
"remote_url": null,
|
||||
"preview_remote_url": null,
|
||||
"text_url": "https://truthsocial.com/media/SpbYvqKIT2VubC9FFn0",
|
||||
"meta": {
|
||||
"original": {
|
||||
"width": 988,
|
||||
"height": 556,
|
||||
"frame_rate": "60/1",
|
||||
"duration": 1.949025,
|
||||
"bitrate": 402396
|
||||
}
|
||||
},
|
||||
"description": null,
|
||||
"blurhash": null
|
||||
}
|
||||
],
|
||||
"mentions": [],
|
||||
"tags": [],
|
||||
"emojis": [],
|
||||
"card": {
|
||||
"url": "https://rumble.com/vz1trd-video-upload-for-108046244464677537.html?mref=ummtf&mc=3nvg0",
|
||||
"title": "Video upload for 108046244464677537",
|
||||
"description": "",
|
||||
"type": "video",
|
||||
"author_name": "hostid1",
|
||||
"author_url": "https://rumble.com/user/hostid1",
|
||||
"provider_name": "Rumble.com",
|
||||
"provider_url": "https://rumble.com/",
|
||||
"html": "<iframe src=\"https://rumble.com/embed/vwfnq9/\" width=\"988\" height=\"556\" frameborder=\"0\" title=\"Video upload for 108046244464677537\" allowfullscreen=\"\"></iframe>",
|
||||
"width": 988,
|
||||
"height": 556,
|
||||
"image": "https://static-assets.truthsocial.com/tmtg:prime-truth-social-assets/cache/preview_cards/images/000/543/912/original/e1fcf6ace01d9ded.jpg",
|
||||
"embed_url": "",
|
||||
"blurhash": "UQH1;m~8sks,%M~9?DRk-mRnR+xs9cWVj[bH"
|
||||
},
|
||||
"poll": null
|
||||
}
|
|
@ -9,7 +9,7 @@ export const __stub = (func: Function) => mocks.push(func);
|
|||
export const __clear = (): Function[] => mocks = [];
|
||||
|
||||
const setupMock = (axios: AxiosInstance) => {
|
||||
const mock = new MockAdapter(axios);
|
||||
const mock = new MockAdapter(axios, { onNoMatch: 'throwException' });
|
||||
mocks.map(func => func(mock));
|
||||
};
|
||||
|
||||
|
|
Binary file not shown.
BIN
app/soapbox/actions/__tests__/compose.test.js
Normal file
BIN
app/soapbox/actions/__tests__/compose.test.js
Normal file
Binary file not shown.
24
app/soapbox/actions/__tests__/onboarding.test.ts
Normal file
24
app/soapbox/actions/__tests__/onboarding.test.ts
Normal file
|
@ -0,0 +1,24 @@
|
|||
import { getSettings } from 'soapbox/actions/settings';
|
||||
import { createTestStore, rootState } from 'soapbox/jest/test-helpers';
|
||||
|
||||
import { ONBOARDING_VERSION, endOnboarding } from '../onboarding';
|
||||
|
||||
describe('endOnboarding()', () => {
|
||||
it('updates the onboardingVersion setting', async() => {
|
||||
const store = createTestStore(rootState);
|
||||
|
||||
// Sanity check:
|
||||
// `onboardingVersion` should be `0` by default
|
||||
const initialVersion = getSettings(store.getState()).get('onboardingVersion');
|
||||
expect(initialVersion).toBe(0);
|
||||
|
||||
await store.dispatch(endOnboarding());
|
||||
|
||||
// After dispatching, `onboardingVersion` is updated
|
||||
const updatedVersion = getSettings(store.getState()).get('onboardingVersion');
|
||||
expect(updatedVersion).toBe(ONBOARDING_VERSION);
|
||||
|
||||
// Sanity check: `updatedVersion` is greater than `initialVersion`
|
||||
expect(updatedVersion > initialVersion).toBe(true);
|
||||
});
|
||||
});
|
Binary file not shown.
19
app/soapbox/actions/__tests__/soapbox.test.ts
Normal file
19
app/soapbox/actions/__tests__/soapbox.test.ts
Normal file
|
@ -0,0 +1,19 @@
|
|||
import { rootState } from '../../jest/test-helpers';
|
||||
import { getSoapboxConfig } from '../soapbox';
|
||||
|
||||
const ASCII_HEART = '❤'; // '\u2764\uFE0F'
|
||||
const RED_HEART_RGI = '❤️'; // '\u2764'
|
||||
|
||||
describe('getSoapboxConfig()', () => {
|
||||
it('returns RGI heart on Pleroma > 2.3', () => {
|
||||
const state = rootState.setIn(['instance', 'version'], '2.7.2 (compatible; Pleroma 2.3.0)');
|
||||
expect(getSoapboxConfig(state).allowedEmoji.includes(RED_HEART_RGI)).toBe(true);
|
||||
expect(getSoapboxConfig(state).allowedEmoji.includes(ASCII_HEART)).toBe(false);
|
||||
});
|
||||
|
||||
it('returns an ASCII heart on Pleroma < 2.3', () => {
|
||||
const state = rootState.setIn(['instance', 'version'], '2.7.2 (compatible; Pleroma 2.0.0)');
|
||||
expect(getSoapboxConfig(state).allowedEmoji.includes(ASCII_HEART)).toBe(true);
|
||||
expect(getSoapboxConfig(state).allowedEmoji.includes(RED_HEART_RGI)).toBe(false);
|
||||
});
|
||||
});
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
app/soapbox/actions/beta.js
Normal file
BIN
app/soapbox/actions/beta.js
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1,30 +1,19 @@
|
|||
import { createAsyncThunk } from '@reduxjs/toolkit';
|
||||
import { get } from 'lodash';
|
||||
|
||||
import KVStore from 'soapbox/storage/kv_store';
|
||||
import { AppDispatch, RootState } from 'soapbox/store';
|
||||
import { RootState } from 'soapbox/store';
|
||||
import { getAuthUserUrl } from 'soapbox/utils/auth';
|
||||
import { parseVersion } from 'soapbox/utils/features';
|
||||
|
||||
import api from '../api';
|
||||
|
||||
export const INSTANCE_FETCH_REQUEST = 'INSTANCE_FETCH_REQUEST';
|
||||
export const INSTANCE_FETCH_SUCCESS = 'INSTANCE_FETCH_SUCCESS';
|
||||
export const INSTANCE_FETCH_FAIL = 'INSTANCE_FETCH_FAIL';
|
||||
|
||||
export const INSTANCE_REMEMBER_REQUEST = 'INSTANCE_REMEMBER_REQUEST';
|
||||
export const INSTANCE_REMEMBER_SUCCESS = 'INSTANCE_REMEMBER_SUCCESS';
|
||||
export const INSTANCE_REMEMBER_FAIL = 'INSTANCE_REMEMBER_FAIL';
|
||||
|
||||
export const NODEINFO_FETCH_REQUEST = 'NODEINFO_FETCH_REQUEST';
|
||||
export const NODEINFO_FETCH_SUCCESS = 'NODEINFO_FETCH_SUCCESS';
|
||||
export const NODEINFO_FETCH_FAIL = 'NODEINFO_FETCH_FAIL';
|
||||
|
||||
const getMeUrl = (state: RootState) => {
|
||||
const me = state.me;
|
||||
return state.accounts.getIn([me, 'url']);
|
||||
};
|
||||
|
||||
// Figure out the appropriate instance to fetch depending on the state
|
||||
/** Figure out the appropriate instance to fetch depending on the state */
|
||||
export const getHost = (state: RootState) => {
|
||||
const accountUrl = getMeUrl(state) || getAuthUserUrl(state);
|
||||
|
||||
|
@ -35,57 +24,45 @@ export const getHost = (state: RootState) => {
|
|||
}
|
||||
};
|
||||
|
||||
export function rememberInstance(host: string) {
|
||||
return (dispatch: AppDispatch, _getState: () => RootState) => {
|
||||
dispatch({ type: INSTANCE_REMEMBER_REQUEST, host });
|
||||
return KVStore.getItemOrError(`instance:${host}`).then((instance: Record<string, any>) => {
|
||||
dispatch({ type: INSTANCE_REMEMBER_SUCCESS, host, instance });
|
||||
return instance;
|
||||
}).catch((error: Error) => {
|
||||
dispatch({ type: INSTANCE_REMEMBER_FAIL, host, error, skipAlert: true });
|
||||
});
|
||||
};
|
||||
}
|
||||
export const rememberInstance = createAsyncThunk(
|
||||
'instance/remember',
|
||||
async(host: string) => {
|
||||
return await KVStore.getItemOrError(`instance:${host}`);
|
||||
},
|
||||
);
|
||||
|
||||
// We may need to fetch nodeinfo on Pleroma < 2.1
|
||||
/** We may need to fetch nodeinfo on Pleroma < 2.1 */
|
||||
const needsNodeinfo = (instance: Record<string, any>): boolean => {
|
||||
const v = parseVersion(get(instance, 'version'));
|
||||
return v.software === 'Pleroma' && !get(instance, ['pleroma', 'metadata']);
|
||||
};
|
||||
|
||||
export function fetchInstance() {
|
||||
return (dispatch: AppDispatch, getState: () => RootState) => {
|
||||
dispatch({ type: INSTANCE_FETCH_REQUEST });
|
||||
return api(getState).get('/api/v1/instance').then(({ data: instance }: { data: Record<string, any> }) => {
|
||||
dispatch({ type: INSTANCE_FETCH_SUCCESS, instance });
|
||||
if (needsNodeinfo(instance)) {
|
||||
dispatch(fetchNodeinfo()); // Pleroma < 2.1 backwards compatibility
|
||||
}
|
||||
}).catch(error => {
|
||||
console.error(error);
|
||||
dispatch({ type: INSTANCE_FETCH_FAIL, error, skipAlert: true });
|
||||
});
|
||||
};
|
||||
}
|
||||
export const fetchInstance = createAsyncThunk<void, void, { state: RootState }>(
|
||||
'instance/fetch',
|
||||
async(_arg, { dispatch, getState }) => {
|
||||
const { data: instance } = await api(getState).get('/api/v1/instance');
|
||||
if (needsNodeinfo(instance)) {
|
||||
dispatch(fetchNodeinfo());
|
||||
}
|
||||
return instance;
|
||||
},
|
||||
);
|
||||
|
||||
// Tries to remember the instance from browser storage before fetching it
|
||||
export function loadInstance() {
|
||||
return (dispatch: AppDispatch, getState: () => RootState) => {
|
||||
/** Tries to remember the instance from browser storage before fetching it */
|
||||
export const loadInstance = createAsyncThunk<void, void, { state: RootState }>(
|
||||
'instance/load',
|
||||
async(_arg, { dispatch, getState }) => {
|
||||
const host = getHost(getState());
|
||||
await Promise.all([
|
||||
dispatch(rememberInstance(host || '')),
|
||||
dispatch(fetchInstance()),
|
||||
]);
|
||||
},
|
||||
);
|
||||
|
||||
return dispatch(rememberInstance(host)).finally(() => {
|
||||
return dispatch(fetchInstance());
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
export function fetchNodeinfo() {
|
||||
return (dispatch: AppDispatch, getState: () => RootState) => {
|
||||
dispatch({ type: NODEINFO_FETCH_REQUEST });
|
||||
return api(getState).get('/nodeinfo/2.1.json').then(({ data: nodeinfo }) => {
|
||||
return dispatch({ type: NODEINFO_FETCH_SUCCESS, nodeinfo });
|
||||
}).catch((error: Error) => {
|
||||
return dispatch({ type: NODEINFO_FETCH_FAIL, error, skipAlert: true });
|
||||
});
|
||||
};
|
||||
}
|
||||
export const fetchNodeinfo = createAsyncThunk<void, void, { state: RootState }>(
|
||||
'nodeinfo/fetch',
|
||||
async(_arg, { getState }) => {
|
||||
return await api(getState).get('/nodeinfo/2.1.json');
|
||||
},
|
||||
);
|
||||
|
|
Binary file not shown.
BIN
app/soapbox/actions/mobile.js
Normal file
BIN
app/soapbox/actions/mobile.js
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
13
app/soapbox/actions/onboarding.ts
Normal file
13
app/soapbox/actions/onboarding.ts
Normal file
|
@ -0,0 +1,13 @@
|
|||
import { changeSettingImmediate } from 'soapbox/actions/settings';
|
||||
|
||||
/** Repeat the onboading process when we bump the version */
|
||||
export const ONBOARDING_VERSION = 1;
|
||||
|
||||
/** Finish onboarding and store the setting */
|
||||
const endOnboarding = () => (dispatch: React.Dispatch<any>) => {
|
||||
dispatch(changeSettingImmediate(['onboardingVersion'], ONBOARDING_VERSION));
|
||||
};
|
||||
|
||||
export {
|
||||
endOnboarding,
|
||||
};
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
app/soapbox/actions/trending_statuses.js
Normal file
BIN
app/soapbox/actions/trending_statuses.js
Normal file
Binary file not shown.
BIN
app/soapbox/actions/verification.js
Normal file
BIN
app/soapbox/actions/verification.js
Normal file
Binary file not shown.
|
@ -24,6 +24,10 @@ export const getLinks = (response: AxiosResponse): LinkHeader => {
|
|||
return new LinkHeader(response.headers?.link);
|
||||
};
|
||||
|
||||
export const getNextLink = (response: AxiosResponse): string | undefined => {
|
||||
return getLinks(response).refs.find(link => link.rel === 'next')?.uri;
|
||||
};
|
||||
|
||||
const getToken = (state: RootState, authType: string) => {
|
||||
return authType === 'app' ? getAppToken(state) : getAccessToken(state);
|
||||
};
|
||||
|
@ -31,7 +35,7 @@ const getToken = (state: RootState, authType: string) => {
|
|||
const maybeParseJSON = (data: string) => {
|
||||
try {
|
||||
return JSON.parse(data);
|
||||
} catch(Exception) {
|
||||
} catch (Exception) {
|
||||
return data;
|
||||
}
|
||||
};
|
||||
|
@ -83,7 +87,7 @@ export default (getState: () => RootState, authType: string = 'user'): AxiosInst
|
|||
const state = getState();
|
||||
const accessToken = getToken(state, authType);
|
||||
const me = state.me;
|
||||
const baseURL = getAuthBaseURL(state, me);
|
||||
const baseURL = me ? getAuthBaseURL(state, me) : '';
|
||||
|
||||
return baseClient(accessToken, baseURL);
|
||||
};
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
app/soapbox/components/__mocks__/react-inlinesvg.js
vendored
BIN
app/soapbox/components/__mocks__/react-inlinesvg.js
vendored
Binary file not shown.
15
app/soapbox/components/__mocks__/react-inlinesvg.tsx
Normal file
15
app/soapbox/components/__mocks__/react-inlinesvg.tsx
Normal file
|
@ -0,0 +1,15 @@
|
|||
import * as React from 'react';
|
||||
|
||||
interface IInlineSVG {
|
||||
loader?: JSX.Element,
|
||||
}
|
||||
|
||||
const InlineSVG: React.FC<IInlineSVG> = ({ loader }): JSX.Element => {
|
||||
if (loader) {
|
||||
return loader;
|
||||
} else {
|
||||
throw 'You used react-inlinesvg without a loader! This will cause jumpy loading during render.';
|
||||
}
|
||||
};
|
||||
|
||||
export default InlineSVG;
|
|
@ -1,27 +0,0 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`<AutosuggestEmoji /> renders emoji with custom url 1`] = `
|
||||
<div
|
||||
className="autosuggest-emoji"
|
||||
>
|
||||
<img
|
||||
alt="foobar"
|
||||
className="emojione"
|
||||
src="http://example.com/emoji.png"
|
||||
/>
|
||||
:foobar:
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`<AutosuggestEmoji /> renders native emoji 1`] = `
|
||||
<div
|
||||
className="autosuggest-emoji"
|
||||
>
|
||||
<img
|
||||
alt="💙"
|
||||
className="emojione"
|
||||
src="/packs/emoji/1f499.svg"
|
||||
/>
|
||||
:foobar:
|
||||
</div>
|
||||
`;
|
|
@ -1,37 +0,0 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`<Avatar /> Autoplay renders an animated avatar 1`] = `
|
||||
<div
|
||||
className="account__avatar still-image"
|
||||
style={
|
||||
Object {
|
||||
"height": "100px",
|
||||
"width": "100px",
|
||||
}
|
||||
}
|
||||
>
|
||||
<img
|
||||
alt=""
|
||||
onLoad={[Function]}
|
||||
src="/animated/alice.gif"
|
||||
/>
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`<Avatar /> Still renders a still avatar 1`] = `
|
||||
<div
|
||||
className="account__avatar still-image"
|
||||
style={
|
||||
Object {
|
||||
"height": "100px",
|
||||
"width": "100px",
|
||||
}
|
||||
}
|
||||
>
|
||||
<img
|
||||
alt=""
|
||||
onLoad={[Function]}
|
||||
src="/animated/alice.gif"
|
||||
/>
|
||||
</div>
|
||||
`;
|
|
@ -1,28 +0,0 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`<AvatarOverlay renders a overlay avatar 1`] = `
|
||||
<div
|
||||
className="account__avatar-overlay"
|
||||
>
|
||||
<div
|
||||
className="account__avatar-overlay-base still-image"
|
||||
style={Object {}}
|
||||
>
|
||||
<img
|
||||
alt=""
|
||||
onLoad={[Function]}
|
||||
src="/animated/alice.gif"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className="account__avatar-overlay-overlay still-image"
|
||||
style={Object {}}
|
||||
>
|
||||
<img
|
||||
alt=""
|
||||
onLoad={[Function]}
|
||||
src="/animated/eve.gif"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
|
@ -1,9 +0,0 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`<Badge /> renders correctly 1`] = `
|
||||
<span
|
||||
className="badge badge--patron"
|
||||
>
|
||||
Patron
|
||||
</span>
|
||||
`;
|
|
@ -1,108 +0,0 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`<Button /> adds class "button-secondary" if props.secondary given 1`] = `
|
||||
<button
|
||||
className="button button-secondary"
|
||||
onClick={[Function]}
|
||||
style={
|
||||
Object {
|
||||
"height": "36px",
|
||||
"lineHeight": "36px",
|
||||
"padding": "0 16px",
|
||||
}
|
||||
}
|
||||
/>
|
||||
`;
|
||||
|
||||
exports[`<Button /> renders a button element 1`] = `
|
||||
<button
|
||||
className="button"
|
||||
onClick={[Function]}
|
||||
style={
|
||||
Object {
|
||||
"height": "36px",
|
||||
"lineHeight": "36px",
|
||||
"padding": "0 16px",
|
||||
}
|
||||
}
|
||||
/>
|
||||
`;
|
||||
|
||||
exports[`<Button /> renders a disabled attribute if props.disabled given 1`] = `
|
||||
<button
|
||||
className="button"
|
||||
disabled={true}
|
||||
onClick={[Function]}
|
||||
style={
|
||||
Object {
|
||||
"height": "36px",
|
||||
"lineHeight": "36px",
|
||||
"padding": "0 16px",
|
||||
}
|
||||
}
|
||||
/>
|
||||
`;
|
||||
|
||||
exports[`<Button /> renders class="button--block" if props.block given 1`] = `
|
||||
<button
|
||||
className="button button--block"
|
||||
onClick={[Function]}
|
||||
style={
|
||||
Object {
|
||||
"height": "36px",
|
||||
"lineHeight": "36px",
|
||||
"padding": "0 16px",
|
||||
}
|
||||
}
|
||||
/>
|
||||
`;
|
||||
|
||||
exports[`<Button /> renders the children 1`] = `
|
||||
<button
|
||||
className="button"
|
||||
onClick={[Function]}
|
||||
style={
|
||||
Object {
|
||||
"height": "36px",
|
||||
"lineHeight": "36px",
|
||||
"padding": "0 16px",
|
||||
}
|
||||
}
|
||||
>
|
||||
<p>
|
||||
children
|
||||
</p>
|
||||
</button>
|
||||
`;
|
||||
|
||||
exports[`<Button /> renders the given text 1`] = `
|
||||
<button
|
||||
className="button"
|
||||
onClick={[Function]}
|
||||
style={
|
||||
Object {
|
||||
"height": "36px",
|
||||
"lineHeight": "36px",
|
||||
"padding": "0 16px",
|
||||
}
|
||||
}
|
||||
>
|
||||
foo
|
||||
</button>
|
||||
`;
|
||||
|
||||
exports[`<Button /> renders the props.text instead of children 1`] = `
|
||||
<button
|
||||
className="button"
|
||||
onClick={[Function]}
|
||||
style={
|
||||
Object {
|
||||
"height": "36px",
|
||||
"lineHeight": "36px",
|
||||
"padding": "0 16px",
|
||||
}
|
||||
}
|
||||
>
|
||||
foo
|
||||
</button>
|
||||
`;
|
|
@ -1,8 +0,0 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`<Column /> renders correctly with minimal props 1`] = `
|
||||
<div
|
||||
className="column"
|
||||
role="region"
|
||||
/>
|
||||
`;
|
|
@ -1,16 +0,0 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`<ColumnBackButton /> renders correctly 1`] = `
|
||||
<button
|
||||
className="column-back-button"
|
||||
onClick={[Function]}
|
||||
onKeyUp={[Function]}
|
||||
>
|
||||
<i
|
||||
alt="chevron-left"
|
||||
className="fa fa-chevron-left column-back-button__icon fa-fw"
|
||||
role="img"
|
||||
/>
|
||||
Back
|
||||
</button>
|
||||
`;
|
|
@ -1,35 +0,0 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`<DisplayName /> renders display name + account name 1`] = `
|
||||
<span
|
||||
className="display-name"
|
||||
>
|
||||
<span
|
||||
className="hover-ref-wrapper"
|
||||
onClick={[Function]}
|
||||
onMouseEnter={[Function]}
|
||||
onMouseLeave={[Function]}
|
||||
>
|
||||
<span
|
||||
className="display-name__name"
|
||||
>
|
||||
<bdi>
|
||||
<strong
|
||||
className="display-name__html"
|
||||
dangerouslySetInnerHTML={
|
||||
Object {
|
||||
"__html": "<p>Foo</p>",
|
||||
}
|
||||
}
|
||||
/>
|
||||
</bdi>
|
||||
</span>
|
||||
</span>
|
||||
<span
|
||||
className="display-name__account"
|
||||
>
|
||||
@
|
||||
bar@baz
|
||||
</span>
|
||||
</span>
|
||||
`;
|
|
@ -1,82 +0,0 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`<EmojiSelector /> renders correctly 1`] = `
|
||||
<div
|
||||
className="emoji-react-selector-container"
|
||||
onBlur={[Function]}
|
||||
onFocus={[Function]}
|
||||
tabIndex="-1"
|
||||
>
|
||||
<div
|
||||
className="emoji-react-selector"
|
||||
onBlur={[Function]}
|
||||
>
|
||||
<button
|
||||
className="emoji-react-selector__emoji"
|
||||
dangerouslySetInnerHTML={
|
||||
Object {
|
||||
"__html": "<img draggable=\\"false\\" class=\\"emojione\\" alt=\\"👍\\" title=\\":+1:\\" src=\\"/packs/emoji/1f44d.svg\\" />",
|
||||
}
|
||||
}
|
||||
onClick={[Function]}
|
||||
onKeyDown={[Function]}
|
||||
tabIndex={-1}
|
||||
/>
|
||||
<button
|
||||
className="emoji-react-selector__emoji"
|
||||
dangerouslySetInnerHTML={
|
||||
Object {
|
||||
"__html": "<img draggable=\\"false\\" class=\\"emojione\\" alt=\\"❤\\" title=\\":heart:\\" src=\\"/packs/emoji/2764.svg\\" />",
|
||||
}
|
||||
}
|
||||
onClick={[Function]}
|
||||
onKeyDown={[Function]}
|
||||
tabIndex={-1}
|
||||
/>
|
||||
<button
|
||||
className="emoji-react-selector__emoji"
|
||||
dangerouslySetInnerHTML={
|
||||
Object {
|
||||
"__html": "<img draggable=\\"false\\" class=\\"emojione\\" alt=\\"😆\\" title=\\":laughing:\\" src=\\"/packs/emoji/1f606.svg\\" />",
|
||||
}
|
||||
}
|
||||
onClick={[Function]}
|
||||
onKeyDown={[Function]}
|
||||
tabIndex={-1}
|
||||
/>
|
||||
<button
|
||||
className="emoji-react-selector__emoji"
|
||||
dangerouslySetInnerHTML={
|
||||
Object {
|
||||
"__html": "<img draggable=\\"false\\" class=\\"emojione\\" alt=\\"😮\\" title=\\":open_mouth:\\" src=\\"/packs/emoji/1f62e.svg\\" />",
|
||||
}
|
||||
}
|
||||
onClick={[Function]}
|
||||
onKeyDown={[Function]}
|
||||
tabIndex={-1}
|
||||
/>
|
||||
<button
|
||||
className="emoji-react-selector__emoji"
|
||||
dangerouslySetInnerHTML={
|
||||
Object {
|
||||
"__html": "<img draggable=\\"false\\" class=\\"emojione\\" alt=\\"😢\\" title=\\":cry:\\" src=\\"/packs/emoji/1f622.svg\\" />",
|
||||
}
|
||||
}
|
||||
onClick={[Function]}
|
||||
onKeyDown={[Function]}
|
||||
tabIndex={-1}
|
||||
/>
|
||||
<button
|
||||
className="emoji-react-selector__emoji"
|
||||
dangerouslySetInnerHTML={
|
||||
Object {
|
||||
"__html": "<img draggable=\\"false\\" class=\\"emojione\\" alt=\\"😩\\" title=\\":weary:\\" src=\\"/packs/emoji/1f629.svg\\" />",
|
||||
}
|
||||
}
|
||||
onClick={[Function]}
|
||||
onKeyDown={[Function]}
|
||||
tabIndex={-1}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
|
@ -1,80 +0,0 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`<TimelineQueueButtonHeader /> renders correctly 1`] = `
|
||||
<div
|
||||
className="timeline-queue-header hidden"
|
||||
>
|
||||
<a
|
||||
className="timeline-queue-header__btn"
|
||||
onClick={[Function]}
|
||||
>
|
||||
<div
|
||||
className="svg-icon"
|
||||
>
|
||||
<svg
|
||||
id={
|
||||
Object {
|
||||
"process": [Function],
|
||||
}
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`<TimelineQueueButtonHeader /> renders correctly 2`] = `
|
||||
<div
|
||||
className="timeline-queue-header hidden"
|
||||
>
|
||||
<a
|
||||
className="timeline-queue-header__btn"
|
||||
onClick={[Function]}
|
||||
>
|
||||
<div
|
||||
className="svg-icon"
|
||||
>
|
||||
<svg
|
||||
id={
|
||||
Object {
|
||||
"process": [Function],
|
||||
}
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className="timeline-queue-header__label"
|
||||
>
|
||||
Click to see 1 new post
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`<TimelineQueueButtonHeader /> renders correctly 3`] = `
|
||||
<div
|
||||
className="timeline-queue-header hidden"
|
||||
>
|
||||
<a
|
||||
className="timeline-queue-header__btn"
|
||||
onClick={[Function]}
|
||||
>
|
||||
<div
|
||||
className="svg-icon"
|
||||
>
|
||||
<svg
|
||||
id={
|
||||
Object {
|
||||
"process": [Function],
|
||||
}
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className="timeline-queue-header__label"
|
||||
>
|
||||
Click to see 9999999 new posts
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
`;
|
Binary file not shown.
BIN
app/soapbox/components/__tests__/autosuggest_emoji.test.js
Normal file
BIN
app/soapbox/components/__tests__/autosuggest_emoji.test.js
Normal file
Binary file not shown.
Binary file not shown.
BIN
app/soapbox/components/__tests__/avatar.test.js
Normal file
BIN
app/soapbox/components/__tests__/avatar.test.js
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
app/soapbox/components/__tests__/badge.test.js
Normal file
BIN
app/soapbox/components/__tests__/badge.test.js
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
app/soapbox/components/__tests__/column_back_button.test.js
Normal file
BIN
app/soapbox/components/__tests__/column_back_button.test.js
Normal file
Binary file not shown.
Binary file not shown.
BIN
app/soapbox/components/__tests__/display_name.test.js
Normal file
BIN
app/soapbox/components/__tests__/display_name.test.js
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
222
app/soapbox/components/account.tsx
Normal file
222
app/soapbox/components/account.tsx
Normal file
|
@ -0,0 +1,222 @@
|
|||
import * as React from 'react';
|
||||
import { Link, useHistory } from 'react-router-dom';
|
||||
|
||||
import HoverRefWrapper from 'soapbox/components/hover_ref_wrapper';
|
||||
import VerificationBadge from 'soapbox/components/verification_badge';
|
||||
import ActionButton from 'soapbox/features/ui/components/action_button';
|
||||
import { useAppSelector, useOnScreen } from 'soapbox/hooks';
|
||||
import { getAcct } from 'soapbox/utils/accounts';
|
||||
import { displayFqn } from 'soapbox/utils/state';
|
||||
|
||||
import RelativeTimestamp from './relative_timestamp';
|
||||
import { Avatar, HStack, IconButton, Text } from './ui';
|
||||
|
||||
import type { Account as AccountEntity } from 'soapbox/types/entities';
|
||||
|
||||
interface IInstanceFavicon {
|
||||
account: AccountEntity,
|
||||
}
|
||||
|
||||
const InstanceFavicon: React.FC<IInstanceFavicon> = ({ account }) => {
|
||||
const history = useHistory();
|
||||
|
||||
const handleClick: React.MouseEventHandler = (e) => {
|
||||
e.stopPropagation();
|
||||
history.push(`/timeline/${account.domain}`);
|
||||
};
|
||||
|
||||
return (
|
||||
<button className='w-4 h-4 flex-none' onClick={handleClick}>
|
||||
<img src={account.favicon} alt='' title={account.domain} className='w-full max-h-full' />
|
||||
</button>
|
||||
);
|
||||
};
|
||||
|
||||
interface IProfilePopper {
|
||||
condition: boolean,
|
||||
wrapper: (children: any) => React.ReactElement<any, any>
|
||||
}
|
||||
|
||||
const ProfilePopper: React.FC<IProfilePopper> = ({ condition, wrapper, children }): any =>
|
||||
condition ? wrapper(children) : children;
|
||||
|
||||
interface IAccount {
|
||||
account: AccountEntity,
|
||||
action?: React.ReactElement,
|
||||
actionAlignment?: 'center' | 'top',
|
||||
actionIcon?: string,
|
||||
actionTitle?: string,
|
||||
avatarSize?: number,
|
||||
hidden?: boolean,
|
||||
hideActions?: boolean,
|
||||
id?: string,
|
||||
onActionClick?: (account: any) => void,
|
||||
showProfileHoverCard?: boolean,
|
||||
timestamp?: string | Date,
|
||||
timestampUrl?: string,
|
||||
withDate?: boolean,
|
||||
withRelationship?: boolean,
|
||||
}
|
||||
|
||||
const Account = ({
|
||||
account,
|
||||
action,
|
||||
actionIcon,
|
||||
actionTitle,
|
||||
actionAlignment = 'center',
|
||||
avatarSize = 42,
|
||||
hidden = false,
|
||||
hideActions = false,
|
||||
onActionClick,
|
||||
showProfileHoverCard = true,
|
||||
timestamp,
|
||||
timestampUrl,
|
||||
withDate = false,
|
||||
withRelationship = true,
|
||||
}: IAccount) => {
|
||||
const overflowRef = React.useRef<HTMLDivElement>(null);
|
||||
const actionRef = React.useRef<HTMLDivElement>(null);
|
||||
// @ts-ignore
|
||||
const isOnScreen = useOnScreen(overflowRef);
|
||||
|
||||
const [style, setStyle] = React.useState<React.CSSProperties>({ visibility: 'hidden' });
|
||||
|
||||
const me = useAppSelector((state) => state.me);
|
||||
const username = useAppSelector((state) => account ? getAcct(account, displayFqn(state)) : null);
|
||||
|
||||
const handleAction = () => {
|
||||
// @ts-ignore
|
||||
onActionClick(account);
|
||||
};
|
||||
|
||||
const renderAction = () => {
|
||||
if (action) {
|
||||
return action;
|
||||
}
|
||||
|
||||
if (hideActions) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (onActionClick && actionIcon) {
|
||||
return (
|
||||
<IconButton
|
||||
src={actionIcon}
|
||||
title={actionTitle}
|
||||
onClick={handleAction}
|
||||
className='bg-transparent text-gray-400 hover:text-gray-600'
|
||||
iconClassName='w-4 h-4'
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
if (account.id !== me) {
|
||||
return <ActionButton account={account} />;
|
||||
}
|
||||
|
||||
return null;
|
||||
};
|
||||
|
||||
React.useEffect(() => {
|
||||
const style: React.CSSProperties = {};
|
||||
const actionWidth = actionRef.current?.clientWidth || 0;
|
||||
|
||||
if (overflowRef.current) {
|
||||
style.maxWidth = overflowRef.current.clientWidth - 30 - avatarSize - actionWidth;
|
||||
} else {
|
||||
style.visibility = 'hidden';
|
||||
}
|
||||
|
||||
setStyle(style);
|
||||
}, [isOnScreen, overflowRef, actionRef]);
|
||||
|
||||
if (!account) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (hidden) {
|
||||
return (
|
||||
<>
|
||||
{account.display_name}
|
||||
{account.username}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
if (withDate) timestamp = account.created_at;
|
||||
|
||||
const LinkEl: any = showProfileHoverCard ? Link : 'div';
|
||||
|
||||
return (
|
||||
<div data-testid='account' className='flex-shrink-0 group block w-full' ref={overflowRef}>
|
||||
<HStack alignItems={actionAlignment} justifyContent='between'>
|
||||
<HStack alignItems='center' space={3} grow>
|
||||
<ProfilePopper
|
||||
condition={showProfileHoverCard}
|
||||
wrapper={(children) => <HoverRefWrapper accountId={account.id} inline>{children}</HoverRefWrapper>}
|
||||
>
|
||||
<LinkEl
|
||||
to={`/@${account.acct}`}
|
||||
title={account.acct}
|
||||
onClick={(event: React.MouseEvent) => event.stopPropagation()}
|
||||
>
|
||||
<Avatar src={account.avatar} size={avatarSize} />
|
||||
</LinkEl>
|
||||
</ProfilePopper>
|
||||
|
||||
<div className='flex-grow'>
|
||||
<ProfilePopper
|
||||
condition={showProfileHoverCard}
|
||||
wrapper={(children) => <HoverRefWrapper accountId={account.id} inline>{children}</HoverRefWrapper>}
|
||||
>
|
||||
<LinkEl
|
||||
to={`/@${account.acct}`}
|
||||
title={account.acct}
|
||||
onClick={(event: React.MouseEvent) => event.stopPropagation()}
|
||||
>
|
||||
<div className='flex items-center space-x-1 flex-grow' style={style}>
|
||||
<Text
|
||||
size='sm'
|
||||
weight='semibold'
|
||||
truncate
|
||||
dangerouslySetInnerHTML={{ __html: account.display_name_html }}
|
||||
/>
|
||||
|
||||
{account.verified && <VerificationBadge />}
|
||||
</div>
|
||||
</LinkEl>
|
||||
</ProfilePopper>
|
||||
|
||||
<HStack alignItems='center' space={1} style={style}>
|
||||
<Text theme='muted' size='sm' truncate>@{username}</Text>
|
||||
|
||||
{account.favicon && (
|
||||
<InstanceFavicon account={account} />
|
||||
)}
|
||||
|
||||
{(timestamp) ? (
|
||||
<>
|
||||
<Text tag='span' theme='muted' size='sm'>·</Text>
|
||||
|
||||
{timestampUrl ? (
|
||||
<Link to={timestampUrl} className='hover:underline'>
|
||||
<RelativeTimestamp timestamp={timestamp} theme='muted' size='sm' className='whitespace-nowrap' />
|
||||
</Link>
|
||||
) : (
|
||||
<RelativeTimestamp timestamp={timestamp} theme='muted' size='sm' className='whitespace-nowrap' />
|
||||
)}
|
||||
</>
|
||||
) : null}
|
||||
</HStack>
|
||||
</div>
|
||||
</HStack>
|
||||
|
||||
<div ref={actionRef}>
|
||||
{withRelationship ? renderAction() : null}
|
||||
</div>
|
||||
</HStack>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default Account;
|
Binary file not shown.
54
app/soapbox/components/attachment_list.tsx
Normal file
54
app/soapbox/components/attachment_list.tsx
Normal file
|
@ -0,0 +1,54 @@
|
|||
import React from 'react';
|
||||
|
||||
import Icon from 'soapbox/components/icon';
|
||||
|
||||
import type { Attachment as AttachmentEntity } from 'soapbox/types/entities';
|
||||
|
||||
const filename = (url: string) => url.split('/').pop()!.split('#')[0].split('?')[0];
|
||||
|
||||
interface IAttachmentList {
|
||||
media: AttachmentEntity[],
|
||||
compact?: boolean,
|
||||
}
|
||||
|
||||
const AttachmentList: React.FC<IAttachmentList> = ({ media, compact }) => {
|
||||
if (compact) {
|
||||
return (
|
||||
<div className='attachment-list compact'>
|
||||
<ul className='attachment-list__list'>
|
||||
{media.map(attachment => {
|
||||
const displayUrl = attachment.get('remote_url') || attachment.get('url');
|
||||
|
||||
return (
|
||||
<li key={attachment.get('id')}>
|
||||
<a href={displayUrl} target='_blank' rel='noopener'><Icon id='link' /> {filename(displayUrl)}</a>
|
||||
</li>
|
||||
);
|
||||
})}
|
||||
</ul>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<div className='attachment-list'>
|
||||
<div className='attachment-list__icon'>
|
||||
<Icon id='link' />
|
||||
</div>
|
||||
|
||||
<ul className='attachment-list__list'>
|
||||
{media.map(attachment => {
|
||||
const displayUrl = attachment.get('remote_url') || attachment.get('url');
|
||||
|
||||
return (
|
||||
<li key={attachment.get('id')}>
|
||||
<a href={displayUrl} target='_blank' rel='noopener'>{filename(displayUrl)}</a>
|
||||
</li>
|
||||
);
|
||||
})}
|
||||
</ul>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default AttachmentList;
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue