diff --git a/app/soapbox/__fixtures__/mitra-status-with-attachments.json b/app/soapbox/__fixtures__/mitra-status-with-attachments.json
new file mode 100644
index 0000000000..689e4d3bb2
--- /dev/null
+++ b/app/soapbox/__fixtures__/mitra-status-with-attachments.json
@@ -0,0 +1,95 @@
+{
+ "id": "017eeb0e-e5e7-98fe-6b2b-ad02349251fb",
+ "uri": "https://gleasonator.com/objects/aa5e66c9-0a10-4167-9c80-f40d9574aaec",
+ "created_at": "2022-02-11T23:11:59.891770Z",
+ "account": {
+ "id": "8fe4d6ed-3a99-43e1-a7d4-66b4e635f756",
+ "username": "alex",
+ "acct": "alex@gleasonator.com",
+ "url": "https://gleasonator.com/users/alex",
+ "display_name": "Alex Gleason",
+ "created_at": "2021-11-14T17:01:17.446307Z",
+ "note": "I create Fediverse software that empowers people online.
I'm vegan btw
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.",
+ "avatar": "https://mitra.social/media/6d64aecb17348b23aaff78db4687b9476cb0da1c07cc6a819c2e6ec7144c18b1.png",
+ "header": "https://mitra.social/media/bdfb009adac0e31257e9fe527d3844a7234cc71f6e06dff2bec94354639555dd.png",
+ "fields": [
+ {
+ "name": "Website",
+ "value": "https://alexgleason.me"
+ },
+ {
+ "name": "Pleroma+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"
+ }
+ ],
+ "followers_count": 2,
+ "following_count": 2,
+ "statuses_count": 970,
+ "source": null,
+ "wallet_address": null
+ },
+ "content": "
Test
", + "in_reply_to_id": null, + "reblog": null, + "visibility": "public", + "replies_count": 0, + "favourites_count": 0, + "reblogs_count": 0, + "media_attachments": [ + { + "id": "017eeb0e-e5df-30a4-77a7-a929145cb836", + "type": "image", + "url": "https://mitra.social/media/8e04e6091bbbac79641b5812508683ce72c38693661c18d16040553f2371e18d.png" + }, + { + "id": "017eeb0e-e5e4-2a48-2889-afdebf368a54", + "type": "unknown", + "url": "https://mitra.social/media/8f72dc2e98572eb4ba7c3a902bca5f69c448fc4391837e5f8f0d4556280440ac" + }, + { + "id": "017eeb0e-e5e5-79fd-6054-8b6869b1db49", + "type": "unknown", + "url": "https://mitra.social/media/55a81a090247cc4fc127e5716bcf7964f6e0df9b584f85f4696c0b994747a4d0.oga" + }, + { + "id": "017eeb0e-e5e6-c416-a444-21e560c47839", + "type": "unknown", + "url": "https://mitra.social/media/0d96a4ff68ad6d4b6f1f30f713b18d5184912ba8dd389f86aa7710db079abcb0" + } + ], + "mentions": [], + "tags": [], + "favourited": false, + "reblogged": false, + "ipfs_cid": null, + "token_id": null, + "token_tx_id": null +} diff --git a/app/soapbox/__fixtures__/pleroma-status-with-attachments.json b/app/soapbox/__fixtures__/pleroma-status-with-attachments.json new file mode 100644 index 0000000000..75db8292f0 --- /dev/null +++ b/app/soapbox/__fixtures__/pleroma-status-with-attachments.json @@ -0,0 +1,238 @@ +{ + "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": "https://alexgleason.me" + }, + { + "name": "Pleroma+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" + } + ], + "followers_count": 2344, + "following_count": 1564, + "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-02-11T23:12:00", + "locked": false, + "note": "I create Fediverse software that empowers people online.Test
", + "created_at": "2022-02-11T23:11:59.000Z", + "emojis": [], + "favourited": false, + "favourites_count": 1, + "id": "AGNkA21auFR5lnEAHw", + "in_reply_to_account_id": null, + "in_reply_to_id": null, + "language": null, + "media_attachments": [ + { + "blurhash": "emLqe9t7~q%M%M-;WBt7ofRj%Moft7ofoft7ayWBj[of-;j[ayofM{", + "description": "", + "id": "974611173", + "meta": { + "original": { + "aspect": 0.9944598337950139, + "height": 1444, + "width": 1436 + } + }, + "pleroma": { + "mime_type": "image/png" + }, + "preview_url": "https://media.gleasonator.com/8e04e6091bbbac79641b5812508683ce72c38693661c18d16040553f2371e18d.png", + "remote_url": "https://media.gleasonator.com/8e04e6091bbbac79641b5812508683ce72c38693661c18d16040553f2371e18d.png", + "text_url": "https://media.gleasonator.com/8e04e6091bbbac79641b5812508683ce72c38693661c18d16040553f2371e18d.png", + "type": "image", + "url": "https://media.gleasonator.com/8e04e6091bbbac79641b5812508683ce72c38693661c18d16040553f2371e18d.png" + }, + { + "blurhash": null, + "description": "", + "id": "-1764036199", + "pleroma": { + "mime_type": "application/x-nes-rom" + }, + "preview_url": "https://media.gleasonator.com/8f72dc2e98572eb4ba7c3a902bca5f69c448fc4391837e5f8f0d4556280440ac.nes", + "remote_url": "https://media.gleasonator.com/8f72dc2e98572eb4ba7c3a902bca5f69c448fc4391837e5f8f0d4556280440ac.nes", + "text_url": "https://media.gleasonator.com/8f72dc2e98572eb4ba7c3a902bca5f69c448fc4391837e5f8f0d4556280440ac.nes", + "type": "unknown", + "url": "https://media.gleasonator.com/8f72dc2e98572eb4ba7c3a902bca5f69c448fc4391837e5f8f0d4556280440ac.nes" + }, + { + "blurhash": null, + "description": "", + "id": "-636167741", + "pleroma": { + "mime_type": "audio/ogg" + }, + "preview_url": "https://media.gleasonator.com/55a81a090247cc4fc127e5716bcf7964f6e0df9b584f85f4696c0b994747a4d0.ogg", + "remote_url": "https://media.gleasonator.com/55a81a090247cc4fc127e5716bcf7964f6e0df9b584f85f4696c0b994747a4d0.ogg", + "text_url": "https://media.gleasonator.com/55a81a090247cc4fc127e5716bcf7964f6e0df9b584f85f4696c0b994747a4d0.ogg", + "type": "audio", + "url": "https://media.gleasonator.com/55a81a090247cc4fc127e5716bcf7964f6e0df9b584f85f4696c0b994747a4d0.ogg" + }, + { + "blurhash": null, + "description": "", + "id": "517941208", + "pleroma": { + "mime_type": "text/plain" + }, + "preview_url": "https://media.gleasonator.com/0d96a4ff68ad6d4b6f1f30f713b18d5184912ba8dd389f86aa7710db079abcb0.LICENSE", + "remote_url": "https://media.gleasonator.com/0d96a4ff68ad6d4b6f1f30f713b18d5184912ba8dd389f86aa7710db079abcb0.LICENSE", + "text_url": "https://media.gleasonator.com/0d96a4ff68ad6d4b6f1f30f713b18d5184912ba8dd389f86aa7710db079abcb0.LICENSE", + "type": "unknown", + "url": "https://media.gleasonator.com/0d96a4ff68ad6d4b6f1f30f713b18d5184912ba8dd389f86aa7710db079abcb0.LICENSE" + } + ], + "mentions": [], + "muted": false, + "pinned": false, + "pleroma": { + "content": { + "text/plain": "Test" + }, + "conversation_id": "AGNkA1yP66srbtjcJc", + "direct_conversation_id": null, + "emoji_reactions": [], + "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": 0, + "replies_count": 0, + "sensitive": false, + "spoiler_text": "", + "tags": [], + "text": null, + "uri": "https://gleasonator.com/objects/aa5e66c9-0a10-4167-9c80-f40d9574aaec", + "url": "https://gleasonator.com/notice/AGNkA21auFR5lnEAHw", + "visibility": "public" +} diff --git a/app/soapbox/components/media_gallery.js b/app/soapbox/components/media_gallery.js index 34c79c1406..bad4c1b481 100644 Binary files a/app/soapbox/components/media_gallery.js and b/app/soapbox/components/media_gallery.js differ diff --git a/app/soapbox/features/account_gallery/components/media_item.js b/app/soapbox/features/account_gallery/components/media_item.js index 0c5b0afdbd..1cccfe0706 100644 Binary files a/app/soapbox/features/account_gallery/components/media_item.js and b/app/soapbox/features/account_gallery/components/media_item.js differ diff --git a/app/soapbox/reducers/__tests__/statuses-test.js b/app/soapbox/reducers/__tests__/statuses-test.js index 255d3d0a72..926c9a867c 100644 Binary files a/app/soapbox/reducers/__tests__/statuses-test.js and b/app/soapbox/reducers/__tests__/statuses-test.js differ diff --git a/app/soapbox/reducers/statuses.js b/app/soapbox/reducers/statuses.js index f0f3da3ecf..70c62244c8 100644 Binary files a/app/soapbox/reducers/statuses.js and b/app/soapbox/reducers/statuses.js differ