kopia lustrzana https://gitlab.com/soapbox-pub/soapbox
Merge branch 'quote-posts' into 'develop'
Quoting poats, quoting poasts or whatever it's called Closes #809 See merge request soapbox-pub/soapbox-fe!1002merge-requests/1003/head
commit
2d5acc3236
|
@ -0,0 +1,109 @@
|
|||
{
|
||||
"id": "107673570598783346",
|
||||
"created_at": "2022-01-23T20:05:01.372Z",
|
||||
"in_reply_to_id": null,
|
||||
"in_reply_to_account_id": null,
|
||||
"sensitive": false,
|
||||
"spoiler_text": "",
|
||||
"visibility": "public",
|
||||
"language": "en",
|
||||
"uri": "https://fedibird.com/users/alex/statuses/107673570598783346",
|
||||
"url": "https://fedibird.com/@alex/107673570598783346",
|
||||
"replies_count": 0,
|
||||
"reblogs_count": 0,
|
||||
"favourites_count": 0,
|
||||
"emoji_reactions_count": 0,
|
||||
"emoji_reactions": [],
|
||||
"content": "<p>test quote of a quote<span class=\"quote-inline\"><br/>QT: <a class=\"status-url-link\" data-status-account-acct=\"alex\" data-status-id=\"107673570082615319\" href=\"https://fedibird.com/@alex/107673570082615319\" rel=\"nofollow noopener noreferrer\" target=\"_blank\"><span class=\"invisible\">https://</span><span class=\"ellipsis\">fedibird.com/@alex/10767357008</span><span class=\"invisible\">2615319</span></a></span></p>",
|
||||
"quote_id": "107673570082615319",
|
||||
"reblog": null,
|
||||
"application": {
|
||||
"name": "Web",
|
||||
"website": null
|
||||
},
|
||||
"account": {
|
||||
"id": "66768",
|
||||
"username": "alex",
|
||||
"acct": "alex",
|
||||
"display_name": "",
|
||||
"locked": false,
|
||||
"bot": false,
|
||||
"discoverable": null,
|
||||
"group": false,
|
||||
"created_at": "2020-01-27T00:00:00.000Z",
|
||||
"note": "<p></p>",
|
||||
"url": "https://fedibird.com/@alex",
|
||||
"avatar": "https://fedibird.com/avatars/original/missing.png",
|
||||
"avatar_static": "https://fedibird.com/avatars/original/missing.png",
|
||||
"header": "https://fedibird.com/headers/original/missing.png",
|
||||
"header_static": "https://fedibird.com/headers/original/missing.png",
|
||||
"followers_count": 0,
|
||||
"following_count": 1,
|
||||
"subscribing_count": 0,
|
||||
"statuses_count": 3,
|
||||
"last_status_at": "2022-01-23",
|
||||
"emojis": [],
|
||||
"fields": []
|
||||
},
|
||||
"media_attachments": [],
|
||||
"mentions": [],
|
||||
"tags": [],
|
||||
"emojis": [],
|
||||
"card": null,
|
||||
"poll": null,
|
||||
"quote": {
|
||||
"id": "107673570082615319",
|
||||
"created_at": "2022-01-23T20:04:53.494Z",
|
||||
"in_reply_to_id": null,
|
||||
"in_reply_to_account_id": null,
|
||||
"sensitive": false,
|
||||
"spoiler_text": "",
|
||||
"visibility": "public",
|
||||
"language": "en",
|
||||
"uri": "https://fedibird.com/users/alex/statuses/107673570082615319",
|
||||
"url": "https://fedibird.com/@alex/107673570082615319",
|
||||
"replies_count": 0,
|
||||
"reblogs_count": 0,
|
||||
"favourites_count": 0,
|
||||
"emoji_reactions_count": 0,
|
||||
"emoji_reactions": [],
|
||||
"content": "<p>test quote<span class=\"quote-inline\"><br/>QT: <a class=\"status-url-link\" data-status-account-acct=\"alex\" data-status-id=\"107673569214329435\" href=\"https://fedibird.com/@alex/107673569214329435\" rel=\"nofollow noopener noreferrer\" target=\"_blank\"><span class=\"invisible\">https://</span><span class=\"ellipsis\">fedibird.com/@alex/10767356921</span><span class=\"invisible\">4329435</span></a></span></p>",
|
||||
"quote_id": "107673569214329435",
|
||||
"quote": null,
|
||||
"reblog": null,
|
||||
"application": {
|
||||
"name": "Web",
|
||||
"website": null
|
||||
},
|
||||
"account": {
|
||||
"id": "66768",
|
||||
"username": "alex",
|
||||
"acct": "alex",
|
||||
"display_name": "",
|
||||
"locked": false,
|
||||
"bot": false,
|
||||
"discoverable": null,
|
||||
"group": false,
|
||||
"created_at": "2020-01-27T00:00:00.000Z",
|
||||
"note": "<p></p>",
|
||||
"url": "https://fedibird.com/@alex",
|
||||
"avatar": "https://fedibird.com/avatars/original/missing.png",
|
||||
"avatar_static": "https://fedibird.com/avatars/original/missing.png",
|
||||
"header": "https://fedibird.com/headers/original/missing.png",
|
||||
"header_static": "https://fedibird.com/headers/original/missing.png",
|
||||
"followers_count": 0,
|
||||
"following_count": 1,
|
||||
"subscribing_count": 0,
|
||||
"statuses_count": 3,
|
||||
"last_status_at": "2022-01-23",
|
||||
"emojis": [],
|
||||
"fields": []
|
||||
},
|
||||
"media_attachments": [],
|
||||
"mentions": [],
|
||||
"tags": [],
|
||||
"emojis": [],
|
||||
"card": null,
|
||||
"poll": null
|
||||
}
|
||||
}
|
|
@ -0,0 +1,108 @@
|
|||
{
|
||||
"id": "107673570082615319",
|
||||
"created_at": "2022-01-23T20:04:53.494Z",
|
||||
"in_reply_to_id": null,
|
||||
"in_reply_to_account_id": null,
|
||||
"sensitive": false,
|
||||
"spoiler_text": "",
|
||||
"visibility": "public",
|
||||
"language": "en",
|
||||
"uri": "https://fedibird.com/users/alex/statuses/107673570082615319",
|
||||
"url": "https://fedibird.com/@alex/107673570082615319",
|
||||
"replies_count": 0,
|
||||
"reblogs_count": 0,
|
||||
"favourites_count": 0,
|
||||
"emoji_reactions_count": 0,
|
||||
"emoji_reactions": [],
|
||||
"content": "<p>test quote<span class=\"quote-inline\"><br/>QT: <a class=\"status-url-link\" data-status-account-acct=\"alex\" data-status-id=\"107673569214329435\" href=\"https://fedibird.com/@alex/107673569214329435\" rel=\"nofollow noopener noreferrer\" target=\"_blank\"><span class=\"invisible\">https://</span><span class=\"ellipsis\">fedibird.com/@alex/10767356921</span><span class=\"invisible\">4329435</span></a></span></p>",
|
||||
"quote_id": "107673569214329435",
|
||||
"reblog": null,
|
||||
"application": {
|
||||
"name": "Web",
|
||||
"website": null
|
||||
},
|
||||
"account": {
|
||||
"id": "66768",
|
||||
"username": "alex",
|
||||
"acct": "alex",
|
||||
"display_name": "",
|
||||
"locked": false,
|
||||
"bot": false,
|
||||
"discoverable": null,
|
||||
"group": false,
|
||||
"created_at": "2020-01-27T00:00:00.000Z",
|
||||
"note": "<p></p>",
|
||||
"url": "https://fedibird.com/@alex",
|
||||
"avatar": "https://fedibird.com/avatars/original/missing.png",
|
||||
"avatar_static": "https://fedibird.com/avatars/original/missing.png",
|
||||
"header": "https://fedibird.com/headers/original/missing.png",
|
||||
"header_static": "https://fedibird.com/headers/original/missing.png",
|
||||
"followers_count": 0,
|
||||
"following_count": 1,
|
||||
"subscribing_count": 0,
|
||||
"statuses_count": 3,
|
||||
"last_status_at": "2022-01-23",
|
||||
"emojis": [],
|
||||
"fields": []
|
||||
},
|
||||
"media_attachments": [],
|
||||
"mentions": [],
|
||||
"tags": [],
|
||||
"emojis": [],
|
||||
"card": null,
|
||||
"poll": null,
|
||||
"quote": {
|
||||
"id": "107673569214329435",
|
||||
"created_at": "2022-01-23T20:04:40.249Z",
|
||||
"in_reply_to_id": null,
|
||||
"in_reply_to_account_id": null,
|
||||
"sensitive": false,
|
||||
"spoiler_text": "",
|
||||
"visibility": "public",
|
||||
"language": "en",
|
||||
"uri": "https://fedibird.com/users/alex/statuses/107673569214329435",
|
||||
"url": "https://fedibird.com/@alex/107673569214329435",
|
||||
"replies_count": 0,
|
||||
"reblogs_count": 0,
|
||||
"favourites_count": 0,
|
||||
"emoji_reactions_count": 0,
|
||||
"emoji_reactions": [],
|
||||
"content": "<p>test post</p>",
|
||||
"quote": null,
|
||||
"reblog": null,
|
||||
"application": {
|
||||
"name": "Web",
|
||||
"website": null
|
||||
},
|
||||
"account": {
|
||||
"id": "66768",
|
||||
"username": "alex",
|
||||
"acct": "alex",
|
||||
"display_name": "",
|
||||
"locked": false,
|
||||
"bot": false,
|
||||
"discoverable": null,
|
||||
"group": false,
|
||||
"created_at": "2020-01-27T00:00:00.000Z",
|
||||
"note": "<p></p>",
|
||||
"url": "https://fedibird.com/@alex",
|
||||
"avatar": "https://fedibird.com/avatars/original/missing.png",
|
||||
"avatar_static": "https://fedibird.com/avatars/original/missing.png",
|
||||
"header": "https://fedibird.com/headers/original/missing.png",
|
||||
"header_static": "https://fedibird.com/headers/original/missing.png",
|
||||
"followers_count": 0,
|
||||
"following_count": 1,
|
||||
"subscribing_count": 0,
|
||||
"statuses_count": 3,
|
||||
"last_status_at": "2022-01-23",
|
||||
"emojis": [],
|
||||
"fields": []
|
||||
},
|
||||
"media_attachments": [],
|
||||
"mentions": [],
|
||||
"tags": [],
|
||||
"emojis": [],
|
||||
"card": null,
|
||||
"poll": null
|
||||
}
|
||||
}
|
|
@ -0,0 +1,371 @@
|
|||
{
|
||||
"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": "Pleroma+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"
|
||||
}
|
||||
],
|
||||
"followers_count": 2220,
|
||||
"following_count": 1544,
|
||||
"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-01-24T21:02:44",
|
||||
"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,
|
||||
"also_known_as": [],
|
||||
"ap_id": "https://gleasonator.com/users/alex",
|
||||
"background_image": null,
|
||||
"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,
|
||||
"relationship": {},
|
||||
"skip_thread_containment": false,
|
||||
"tags": []
|
||||
},
|
||||
"source": {
|
||||
"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"
|
||||
}
|
||||
],
|
||||
"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
|
||||
},
|
||||
"sensitive": false
|
||||
},
|
||||
"statuses_count": 23004,
|
||||
"url": "https://gleasonator.com/users/alex",
|
||||
"username": "alex"
|
||||
},
|
||||
"application": {
|
||||
"name": "Soapbox FE",
|
||||
"website": "https://soapbox.pub/"
|
||||
},
|
||||
"bookmarked": false,
|
||||
"card": null,
|
||||
"content": "<p>Quote of quote post</p>",
|
||||
"created_at": "2022-01-24T21:02:43.000Z",
|
||||
"emojis": [],
|
||||
"favourited": false,
|
||||
"favourites_count": 0,
|
||||
"id": "AFmFNKmfrR9CxtV01g",
|
||||
"in_reply_to_account_id": null,
|
||||
"in_reply_to_id": null,
|
||||
"language": null,
|
||||
"media_attachments": [],
|
||||
"mentions": [
|
||||
{
|
||||
"acct": "alex",
|
||||
"id": "9v5bmRalQvjOy0ECcC",
|
||||
"url": "https://gleasonator.com/users/alex",
|
||||
"username": "alex"
|
||||
}
|
||||
],
|
||||
"muted": false,
|
||||
"pinned": false,
|
||||
"pleroma": {
|
||||
"content": {
|
||||
"text/plain": "Quote of quote post"
|
||||
},
|
||||
"conversation_id": "AFmFNKkXzLRirIVIi8",
|
||||
"direct_conversation_id": null,
|
||||
"emoji_reactions": [],
|
||||
"expires_at": null,
|
||||
"in_reply_to_account_acct": null,
|
||||
"local": true,
|
||||
"parent_visible": false,
|
||||
"pinned_at": null,
|
||||
"quote": {
|
||||
"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": "Pleroma+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"
|
||||
}
|
||||
],
|
||||
"followers_count": 2220,
|
||||
"following_count": 1544,
|
||||
"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-01-24T21:02:44",
|
||||
"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,
|
||||
"also_known_as": [],
|
||||
"ap_id": "https://gleasonator.com/users/alex",
|
||||
"background_image": null,
|
||||
"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,
|
||||
"relationship": {},
|
||||
"skip_thread_containment": false,
|
||||
"tags": []
|
||||
},
|
||||
"source": {
|
||||
"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"
|
||||
}
|
||||
],
|
||||
"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
|
||||
},
|
||||
"sensitive": false
|
||||
},
|
||||
"statuses_count": 23004,
|
||||
"url": "https://gleasonator.com/users/alex",
|
||||
"username": "alex"
|
||||
},
|
||||
"application": {
|
||||
"name": "Soapbox FE",
|
||||
"website": "https://soapbox.pub/"
|
||||
},
|
||||
"bookmarked": false,
|
||||
"card": null,
|
||||
"content": "<p>Quote post</p>",
|
||||
"created_at": "2022-01-24T21:02:34.000Z",
|
||||
"emojis": [],
|
||||
"favourited": false,
|
||||
"favourites_count": 0,
|
||||
"id": "AFmFMSpITT9xcOJKcK",
|
||||
"in_reply_to_account_id": null,
|
||||
"in_reply_to_id": null,
|
||||
"language": null,
|
||||
"media_attachments": [],
|
||||
"mentions": [
|
||||
{
|
||||
"acct": "alex",
|
||||
"id": "9v5bmRalQvjOy0ECcC",
|
||||
"url": "https://gleasonator.com/users/alex",
|
||||
"username": "alex"
|
||||
}
|
||||
],
|
||||
"muted": false,
|
||||
"pinned": false,
|
||||
"pleroma": {
|
||||
"content": {
|
||||
"text/plain": "Quote post"
|
||||
},
|
||||
"conversation_id": "AFmFMSnWa3k3WtTur2",
|
||||
"direct_conversation_id": null,
|
||||
"emoji_reactions": [
|
||||
{
|
||||
"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": "https://gleasonator.com/objects/4f35159c-3794-4037-9269-a7c84f7137c7",
|
||||
"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/54d93075-7d04-4016-a128-81f3843bca79",
|
||||
"url": "https://gleasonator.com/notice/AFmFMSpITT9xcOJKcK",
|
||||
"visibility": "public"
|
||||
},
|
||||
"quote_url": "https://gleasonator.com/objects/54d93075-7d04-4016-a128-81f3843bca79",
|
||||
"spoiler_text": {
|
||||
"text/plain": ""
|
||||
},
|
||||
"thread_muted": false
|
||||
},
|
||||
"poll": null,
|
||||
"reblog": null,
|
||||
"reblogged": false,
|
||||
"reblogs_count": 0,
|
||||
"replies_count": 1,
|
||||
"sensitive": false,
|
||||
"spoiler_text": "",
|
||||
"tags": [],
|
||||
"text": null,
|
||||
"uri": "https://gleasonator.com/objects/1e2cfb5a-ece5-42df-9ec1-13e5de6d9f5b",
|
||||
"url": "https://gleasonator.com/notice/AFmFNKmfrR9CxtV01g",
|
||||
"visibility": "public"
|
||||
}
|
|
@ -0,0 +1,364 @@
|
|||
{
|
||||
"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": "Pleroma+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"
|
||||
}
|
||||
],
|
||||
"followers_count": 2220,
|
||||
"following_count": 1544,
|
||||
"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-01-24T21:02:44",
|
||||
"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,
|
||||
"also_known_as": [],
|
||||
"ap_id": "https://gleasonator.com/users/alex",
|
||||
"background_image": null,
|
||||
"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,
|
||||
"relationship": {},
|
||||
"skip_thread_containment": false,
|
||||
"tags": []
|
||||
},
|
||||
"source": {
|
||||
"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"
|
||||
}
|
||||
],
|
||||
"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
|
||||
},
|
||||
"sensitive": false
|
||||
},
|
||||
"statuses_count": 23004,
|
||||
"url": "https://gleasonator.com/users/alex",
|
||||
"username": "alex"
|
||||
},
|
||||
"application": {
|
||||
"name": "Soapbox FE",
|
||||
"website": "https://soapbox.pub/"
|
||||
},
|
||||
"bookmarked": false,
|
||||
"card": null,
|
||||
"content": "<p>Quote post</p>",
|
||||
"created_at": "2022-01-24T21:02:34.000Z",
|
||||
"emojis": [],
|
||||
"favourited": false,
|
||||
"favourites_count": 0,
|
||||
"id": "AFmFMSpITT9xcOJKcK",
|
||||
"in_reply_to_account_id": null,
|
||||
"in_reply_to_id": null,
|
||||
"language": null,
|
||||
"media_attachments": [],
|
||||
"mentions": [
|
||||
{
|
||||
"acct": "alex",
|
||||
"id": "9v5bmRalQvjOy0ECcC",
|
||||
"url": "https://gleasonator.com/users/alex",
|
||||
"username": "alex"
|
||||
}
|
||||
],
|
||||
"muted": false,
|
||||
"pinned": false,
|
||||
"pleroma": {
|
||||
"content": {
|
||||
"text/plain": "Quote post"
|
||||
},
|
||||
"conversation_id": "AFmFMSnWa3k3WtTur2",
|
||||
"direct_conversation_id": null,
|
||||
"emoji_reactions": [
|
||||
{
|
||||
"count": 1,
|
||||
"me": false,
|
||||
"name": "👍"
|
||||
}
|
||||
],
|
||||
"expires_at": null,
|
||||
"in_reply_to_account_acct": null,
|
||||
"local": true,
|
||||
"parent_visible": false,
|
||||
"pinned_at": null,
|
||||
"quote": {
|
||||
"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": "Pleroma+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"
|
||||
}
|
||||
],
|
||||
"followers_count": 2220,
|
||||
"following_count": 1544,
|
||||
"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-01-24T21:02:44",
|
||||
"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,
|
||||
"also_known_as": [],
|
||||
"ap_id": "https://gleasonator.com/users/alex",
|
||||
"background_image": null,
|
||||
"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,
|
||||
"relationship": {},
|
||||
"skip_thread_containment": false,
|
||||
"tags": []
|
||||
},
|
||||
"source": {
|
||||
"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"
|
||||
}
|
||||
],
|
||||
"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
|
||||
},
|
||||
"sensitive": false
|
||||
},
|
||||
"statuses_count": 23004,
|
||||
"url": "https://gleasonator.com/users/alex",
|
||||
"username": "alex"
|
||||
},
|
||||
"application": {
|
||||
"name": "Soapbox FE",
|
||||
"website": "https://soapbox.pub/"
|
||||
},
|
||||
"bookmarked": false,
|
||||
"card": null,
|
||||
"content": "<p>Test post</p>",
|
||||
"created_at": "2022-01-24T21:02:25.000Z",
|
||||
"emojis": [],
|
||||
"favourited": false,
|
||||
"favourites_count": 0,
|
||||
"id": "AFmFLcd6XYVdjWCrOS",
|
||||
"in_reply_to_account_id": null,
|
||||
"in_reply_to_id": null,
|
||||
"language": null,
|
||||
"media_attachments": [],
|
||||
"mentions": [],
|
||||
"muted": false,
|
||||
"pinned": false,
|
||||
"pleroma": {
|
||||
"content": {
|
||||
"text/plain": "Test post"
|
||||
},
|
||||
"conversation_id": "AFmFLcaGi6EzaisayO",
|
||||
"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,
|
||||
"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/4f35159c-3794-4037-9269-a7c84f7137c7",
|
||||
"url": "https://gleasonator.com/notice/AFmFLcd6XYVdjWCrOS",
|
||||
"visibility": "public"
|
||||
},
|
||||
"quote_url": "https://gleasonator.com/objects/4f35159c-3794-4037-9269-a7c84f7137c7",
|
||||
"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/54d93075-7d04-4016-a128-81f3843bca79",
|
||||
"url": "https://gleasonator.com/notice/AFmFMSpITT9xcOJKcK",
|
||||
"visibility": "public"
|
||||
}
|
|
@ -27,6 +27,8 @@ export const COMPOSE_SUBMIT_SUCCESS = 'COMPOSE_SUBMIT_SUCCESS';
|
|||
export const COMPOSE_SUBMIT_FAIL = 'COMPOSE_SUBMIT_FAIL';
|
||||
export const COMPOSE_REPLY = 'COMPOSE_REPLY';
|
||||
export const COMPOSE_REPLY_CANCEL = 'COMPOSE_REPLY_CANCEL';
|
||||
export const COMPOSE_QUOTE = 'COMPOSE_QUOTE';
|
||||
export const COMPOSE_QUOTE_CANCEL = 'COMPOSE_QUOTE_CANCEL';
|
||||
export const COMPOSE_DIRECT = 'COMPOSE_DIRECT';
|
||||
export const COMPOSE_MENTION = 'COMPOSE_MENTION';
|
||||
export const COMPOSE_RESET = 'COMPOSE_RESET';
|
||||
|
@ -119,6 +121,29 @@ export function cancelReplyCompose() {
|
|||
};
|
||||
}
|
||||
|
||||
export function quoteCompose(status, routerHistory) {
|
||||
return (dispatch, getState) => {
|
||||
const state = getState();
|
||||
const instance = state.get('instance');
|
||||
const { explicitAddressing } = getFeatures(instance);
|
||||
|
||||
dispatch({
|
||||
type: COMPOSE_QUOTE,
|
||||
status: status,
|
||||
account: state.getIn(['accounts', state.get('me')]),
|
||||
explicitAddressing,
|
||||
});
|
||||
|
||||
dispatch(openModal('COMPOSE'));
|
||||
};
|
||||
}
|
||||
|
||||
export function cancelQuoteCompose() {
|
||||
return {
|
||||
type: COMPOSE_QUOTE_CANCEL,
|
||||
};
|
||||
}
|
||||
|
||||
export function resetCompose() {
|
||||
return {
|
||||
type: COMPOSE_RESET,
|
||||
|
@ -226,6 +251,7 @@ export function submitCompose(routerHistory, force = false) {
|
|||
const params = {
|
||||
status,
|
||||
in_reply_to_id: state.getIn(['compose', 'in_reply_to'], null),
|
||||
quote_id: state.getIn(['compose', 'quote'], null),
|
||||
media_ids: media.map(item => item.get('id')),
|
||||
sensitive: state.getIn(['compose', 'sensitive']),
|
||||
spoiler_text: state.getIn(['compose', 'spoiler_text'], ''),
|
||||
|
|
|
@ -13,12 +13,6 @@ export const STATUSES_IMPORT = 'STATUSES_IMPORT';
|
|||
export const POLLS_IMPORT = 'POLLS_IMPORT';
|
||||
export const ACCOUNT_FETCH_FAIL_FOR_USERNAME_LOOKUP = 'ACCOUNT_FETCH_FAIL_FOR_USERNAME_LOOKUP';
|
||||
|
||||
function pushUnique(array, object) {
|
||||
if (array.every(element => element.id !== object.id)) {
|
||||
array.push(object);
|
||||
}
|
||||
}
|
||||
|
||||
export function importAccount(account) {
|
||||
return { type: ACCOUNT_IMPORT, account };
|
||||
}
|
||||
|
@ -49,7 +43,7 @@ export function importFetchedAccounts(accounts) {
|
|||
function processAccount(account) {
|
||||
if (!account.id) return;
|
||||
|
||||
pushUnique(normalAccounts, normalizeAccount(account));
|
||||
normalAccounts.push(normalizeAccount(account));
|
||||
|
||||
if (account.moved) {
|
||||
processAccount(account.moved);
|
||||
|
@ -75,6 +69,15 @@ export function importFetchedStatus(status, idempotencyKey) {
|
|||
dispatch(importFetchedStatus(status.reblog));
|
||||
}
|
||||
|
||||
// Fedibird quotes
|
||||
if (status.quote && status.quote.id) {
|
||||
dispatch(importFetchedStatus(status.quote));
|
||||
}
|
||||
|
||||
if (status.pleroma && status.pleroma.quote && status.pleroma.quote.id) {
|
||||
dispatch(importFetchedStatus(status.pleroma.quote));
|
||||
}
|
||||
|
||||
if (status.poll && status.poll.id) {
|
||||
dispatch(importFetchedPoll(status.poll));
|
||||
}
|
||||
|
@ -113,15 +116,24 @@ export function importFetchedStatuses(statuses) {
|
|||
const normalOldStatus = getState().getIn(['statuses', status.id]);
|
||||
const expandSpoilers = getSettings(getState()).get('expandSpoilers');
|
||||
|
||||
pushUnique(normalStatuses, normalizeStatus(status, normalOldStatus, expandSpoilers));
|
||||
pushUnique(accounts, status.account);
|
||||
normalStatuses.push(normalizeStatus(status, normalOldStatus, expandSpoilers));
|
||||
accounts.push(status.account);
|
||||
|
||||
if (status.reblog && status.reblog.id) {
|
||||
processStatus(status.reblog);
|
||||
}
|
||||
|
||||
// Fedibird quotes
|
||||
if (status.quote && status.quote.id) {
|
||||
processStatus(status.quote);
|
||||
}
|
||||
|
||||
if (status.pleroma && status.pleroma.quote && status.pleroma.quote.id) {
|
||||
processStatus(status.pleroma.quote);
|
||||
}
|
||||
|
||||
if (status.poll && status.poll.id) {
|
||||
pushUnique(polls, normalizePoll(status.poll));
|
||||
polls.push(normalizePoll(status.poll));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,12 @@ export function normalizeAccount(account) {
|
|||
}
|
||||
|
||||
export function normalizeStatus(status, normalOldStatus, expandSpoilers) {
|
||||
const normalStatus = { ...status };
|
||||
const normalStatus = { ...status };
|
||||
|
||||
// Copy the pleroma object too, so we can modify our copy
|
||||
if (status.pleroma) {
|
||||
normalStatus.pleroma = { ...status.pleroma };
|
||||
}
|
||||
|
||||
normalStatus.account = status.account.id;
|
||||
|
||||
|
@ -49,6 +54,18 @@ export function normalizeStatus(status, normalOldStatus, expandSpoilers) {
|
|||
normalStatus.poll = status.poll.id;
|
||||
}
|
||||
|
||||
if (status.pleroma && status.pleroma.quote && status.pleroma.quote.id) {
|
||||
// Normalize quote to the top-level, so delete the original for performance
|
||||
normalStatus.quote = status.pleroma.quote.id;
|
||||
delete normalStatus.pleroma.quote;
|
||||
} else if (status.quote && status.quote.id) {
|
||||
// Fedibird compatibility, because why not
|
||||
normalStatus.quote = status.quote.id;
|
||||
} else if (status.quote_id) {
|
||||
// Fedibird: fall back to quote_id
|
||||
normalStatus.quote = status.quote_id;
|
||||
}
|
||||
|
||||
// Only calculate these values when status first encountered
|
||||
// Otherwise keep the ones already in the reducer
|
||||
if (normalOldStatus) {
|
||||
|
|
|
@ -207,6 +207,8 @@ export default class Dropdown extends React.PureComponent {
|
|||
src: PropTypes.string,
|
||||
items: PropTypes.array.isRequired,
|
||||
size: PropTypes.number,
|
||||
active: PropTypes.bool,
|
||||
pressed: PropTypes.bool,
|
||||
title: PropTypes.string,
|
||||
disabled: PropTypes.bool,
|
||||
status: ImmutablePropTypes.map,
|
||||
|
@ -217,6 +219,7 @@ export default class Dropdown extends React.PureComponent {
|
|||
dropdownPlacement: PropTypes.string,
|
||||
openDropdownId: PropTypes.number,
|
||||
openedViaKeyboard: PropTypes.bool,
|
||||
text: PropTypes.string,
|
||||
};
|
||||
|
||||
static defaultProps = {
|
||||
|
@ -302,7 +305,7 @@ export default class Dropdown extends React.PureComponent {
|
|||
}
|
||||
|
||||
render() {
|
||||
const { icon, src, items, size, title, disabled, dropdownPlacement, openDropdownId, openedViaKeyboard } = this.props;
|
||||
const { icon, src, items, size, title, disabled, dropdownPlacement, openDropdownId, openedViaKeyboard, active, pressed, text } = this.props;
|
||||
const open = this.state.id === openDropdownId;
|
||||
|
||||
return (
|
||||
|
@ -311,9 +314,11 @@ export default class Dropdown extends React.PureComponent {
|
|||
icon={icon}
|
||||
src={src}
|
||||
title={title}
|
||||
active={open}
|
||||
active={open || active}
|
||||
pressed={pressed}
|
||||
disabled={disabled}
|
||||
size={size}
|
||||
text={text}
|
||||
ref={this.setTargetRef}
|
||||
onClick={this.handleClick}
|
||||
onMouseDown={this.handleMouseDown}
|
||||
|
|
|
@ -18,6 +18,7 @@ const checkComposeContent = compose => {
|
|||
compose.get('spoiler_text').length > 0,
|
||||
compose.get('media_attachments').size > 0,
|
||||
compose.get('in_reply_to') !== null,
|
||||
compose.get('quote') !== null,
|
||||
compose.get('poll') !== null,
|
||||
].some(check => check === true);
|
||||
};
|
||||
|
|
|
@ -10,6 +10,7 @@ import { Link, NavLink } from 'react-router-dom';
|
|||
import HoverRefWrapper from 'soapbox/components/hover_ref_wrapper';
|
||||
import Icon from 'soapbox/components/icon';
|
||||
import PlaceholderCard from 'soapbox/features/placeholder/components/placeholder_card';
|
||||
import QuotedStatus from 'soapbox/features/status/containers/quoted_status_container';
|
||||
import { getDomain } from 'soapbox/utils/accounts';
|
||||
|
||||
import Card from '../features/status/components/card';
|
||||
|
@ -70,6 +71,7 @@ class Status extends ImmutablePureComponent {
|
|||
onReply: PropTypes.func,
|
||||
onFavourite: PropTypes.func,
|
||||
onReblog: PropTypes.func,
|
||||
onQuote: PropTypes.func,
|
||||
onDelete: PropTypes.func,
|
||||
onDirect: PropTypes.func,
|
||||
onChat: PropTypes.func,
|
||||
|
@ -456,7 +458,7 @@ class Status extends ImmutablePureComponent {
|
|||
</Bundle>
|
||||
);
|
||||
}
|
||||
} else if (status.get('spoiler_text').length === 0 && status.get('card')) {
|
||||
} else if (status.get('spoiler_text').length === 0 && !status.get('quote') && status.get('card')) {
|
||||
media = (
|
||||
<Card
|
||||
onOpenMedia={this.props.onOpenMedia}
|
||||
|
@ -472,6 +474,12 @@ class Status extends ImmutablePureComponent {
|
|||
);
|
||||
}
|
||||
|
||||
let quote;
|
||||
|
||||
if (status.get('quote')) {
|
||||
quote = <QuotedStatus statusId={status.get('quote')} />;
|
||||
}
|
||||
|
||||
if (otherAccounts && otherAccounts.size > 1) {
|
||||
statusAvatar = <AvatarComposite accounts={otherAccounts} size={48} />;
|
||||
} else if (account === undefined || account === null) {
|
||||
|
@ -551,6 +559,7 @@ class Status extends ImmutablePureComponent {
|
|||
|
||||
{media}
|
||||
{poll}
|
||||
{quote}
|
||||
|
||||
<StatusActionBar
|
||||
status={status}
|
||||
|
|
|
@ -62,6 +62,7 @@ const messages = defineMessages({
|
|||
reactionOpenMouth: { id: 'status.reactions.open_mouth', defaultMessage: 'Wow' },
|
||||
reactionCry: { id: 'status.reactions.cry', defaultMessage: 'Sad' },
|
||||
reactionWeary: { id: 'status.reactions.weary', defaultMessage: 'Weary' },
|
||||
quotePost: { id: 'status.quote', defaultMessage: 'Quote post' },
|
||||
});
|
||||
|
||||
class StatusActionBar extends ImmutablePureComponent {
|
||||
|
@ -78,6 +79,7 @@ class StatusActionBar extends ImmutablePureComponent {
|
|||
onFavourite: PropTypes.func,
|
||||
onBookmark: PropTypes.func,
|
||||
onReblog: PropTypes.func,
|
||||
onQuote: PropTypes.func,
|
||||
onDelete: PropTypes.func,
|
||||
onDirect: PropTypes.func,
|
||||
onChat: PropTypes.func,
|
||||
|
@ -203,6 +205,15 @@ class StatusActionBar extends ImmutablePureComponent {
|
|||
}
|
||||
}
|
||||
|
||||
handleQuoteClick = () => {
|
||||
const { me, onQuote, onOpenUnauthorizedModal, status } = this.props;
|
||||
if (me) {
|
||||
onQuote(status, this.context.router.history);
|
||||
} else {
|
||||
onOpenUnauthorizedModal('REBLOG');
|
||||
}
|
||||
}
|
||||
|
||||
handleDeleteClick = () => {
|
||||
this.props.onDelete(this.props.status, this.context.router.history);
|
||||
}
|
||||
|
@ -496,7 +507,7 @@ class StatusActionBar extends ImmutablePureComponent {
|
|||
}
|
||||
|
||||
render() {
|
||||
const { status, intl, allowedEmoji, emojiSelectorFocused, handleEmojiSelectorUnfocus, features } = this.props;
|
||||
const { status, intl, allowedEmoji, emojiSelectorFocused, handleEmojiSelectorUnfocus, features, me } = this.props;
|
||||
const { emojiSelectorVisible } = this.state;
|
||||
|
||||
const publicStatus = ['public', 'unlisted'].includes(status.get('visibility'));
|
||||
|
@ -530,6 +541,47 @@ class StatusActionBar extends ImmutablePureComponent {
|
|||
reblogIcon = require('@tabler/icons/icons/lock.svg');
|
||||
}
|
||||
|
||||
let reblogButton;
|
||||
|
||||
if (me && features.quotePosts) {
|
||||
const reblogMenu = [
|
||||
{
|
||||
text: intl.formatMessage(status.get('reblogged') ? messages.cancel_reblog_private : messages.reblog),
|
||||
action: this.handleReblogClick,
|
||||
icon: require('@tabler/icons/icons/repeat.svg'),
|
||||
},
|
||||
{
|
||||
text: intl.formatMessage(messages.quotePost),
|
||||
action: this.handleQuoteClick,
|
||||
icon: require('@tabler/icons/icons/quote.svg'),
|
||||
},
|
||||
];
|
||||
|
||||
reblogButton = (
|
||||
<DropdownMenuContainer
|
||||
items={reblogMenu}
|
||||
disabled={!publicStatus}
|
||||
active={status.get('reblogged')}
|
||||
pressed={status.get('reblogged')}
|
||||
title={!publicStatus ? intl.formatMessage(messages.cannot_reblog) : intl.formatMessage(messages.reblog)}
|
||||
src={reblogIcon}
|
||||
direction='right'
|
||||
/>
|
||||
);
|
||||
} else {
|
||||
reblogButton = (
|
||||
<IconButton
|
||||
className='status__action-bar-button'
|
||||
disabled={!publicStatus}
|
||||
active={status.get('reblogged')}
|
||||
pressed={status.get('reblogged')}
|
||||
title={!publicStatus ? intl.formatMessage(messages.cannot_reblog) : intl.formatMessage(messages.reblog)}
|
||||
src={reblogIcon}
|
||||
onClick={this.handleReblogClick}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
if (status.get('in_reply_to_id', null) === null) {
|
||||
replyTitle = intl.formatMessage(messages.reply);
|
||||
} else {
|
||||
|
@ -553,8 +605,8 @@ class StatusActionBar extends ImmutablePureComponent {
|
|||
<IconButton className='status__action-bar-button' title={replyTitle} src={require('feather-icons/dist/icons/message-circle.svg')} onClick={this.handleReplyClick} />
|
||||
{replyCount !== 0 && <Link to={`/@${status.getIn(['account', 'acct'])}/posts/${status.get('id')}`} className='detailed-status__link'>{replyCount}</Link>}
|
||||
</div>
|
||||
<div className='status__action-bar__counter'>
|
||||
<IconButton className='status__action-bar-button' disabled={!publicStatus} active={status.get('reblogged')} pressed={status.get('reblogged')} title={!publicStatus ? intl.formatMessage(messages.cannot_reblog) : intl.formatMessage(messages.reblog)} src={reblogIcon} onClick={this.handleReblogClick} />
|
||||
<div className='status__action-bar__counter status__action-bar__counter--reblog'>
|
||||
{reblogButton}
|
||||
{reblogCount !== 0 && <span className='detailed-status__link' type='button' role='presentation' onClick={this.handleOpenReblogsModal}>{reblogCount}</span>}
|
||||
</div>
|
||||
<div
|
||||
|
|
|
@ -12,6 +12,7 @@ import {
|
|||
replyCompose,
|
||||
mentionCompose,
|
||||
directCompose,
|
||||
quoteCompose,
|
||||
} from '../actions/compose';
|
||||
import {
|
||||
createRemovedAccount,
|
||||
|
@ -100,7 +101,7 @@ const mapDispatchToProps = (dispatch, { intl }) => {
|
|||
onReblog(status, e) {
|
||||
dispatch((_, getState) => {
|
||||
const boostModal = getSettings(getState()).get('boostModal');
|
||||
if (e.shiftKey || !boostModal) {
|
||||
if ((e && e.shiftKey) || !boostModal) {
|
||||
onModalReblog(status);
|
||||
} else {
|
||||
dispatch(openModal('BOOST', { status, onReblog: onModalReblog }));
|
||||
|
@ -108,6 +109,21 @@ const mapDispatchToProps = (dispatch, { intl }) => {
|
|||
});
|
||||
},
|
||||
|
||||
onQuote(status, router) {
|
||||
dispatch((_, getState) => {
|
||||
const state = getState();
|
||||
if (state.getIn(['compose', 'text']).trim().length !== 0) {
|
||||
dispatch(openModal('CONFIRM', {
|
||||
message: intl.formatMessage(messages.replyMessage),
|
||||
confirm: intl.formatMessage(messages.replyConfirm),
|
||||
onConfirm: () => dispatch(quoteCompose(status, router)),
|
||||
}));
|
||||
} else {
|
||||
dispatch(quoteCompose(status, router));
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
onFavourite(status) {
|
||||
if (status.get('favourited')) {
|
||||
dispatch(unfavourite(status));
|
||||
|
|
|
@ -21,6 +21,7 @@ import MarkdownButtonContainer from '../containers/markdown_button_container';
|
|||
import PollButtonContainer from '../containers/poll_button_container';
|
||||
import PollFormContainer from '../containers/poll_form_container';
|
||||
import PrivacyDropdownContainer from '../containers/privacy_dropdown_container';
|
||||
import QuotedStatusContainer from '../containers/quoted_status_container';
|
||||
import ReplyIndicatorContainer from '../containers/reply_indicator_container';
|
||||
import ReplyMentions from '../containers/reply_mentions_container';
|
||||
import ScheduleButtonContainer from '../containers/schedule_button_container';
|
||||
|
@ -361,6 +362,8 @@ export default class ComposeForm extends ImmutablePureComponent {
|
|||
}
|
||||
</AutosuggestTextarea>
|
||||
|
||||
<QuotedStatusContainer />
|
||||
|
||||
<div className='compose-form__buttons-wrapper'>
|
||||
<div className='compose-form__buttons'>
|
||||
<UploadButtonContainer />
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
import { connect } from 'react-redux';
|
||||
|
||||
import { cancelQuoteCompose } from 'soapbox/actions/compose';
|
||||
import QuotedStatus from 'soapbox/features/status/components/quoted_status';
|
||||
import { makeGetStatus } from 'soapbox/selectors';
|
||||
|
||||
const makeMapStateToProps = () => {
|
||||
const getStatus = makeGetStatus();
|
||||
|
||||
const mapStateToProps = state => ({
|
||||
status: getStatus(state, { id: state.getIn(['compose', 'quote']) }),
|
||||
compose: true,
|
||||
});
|
||||
|
||||
return mapStateToProps;
|
||||
};
|
||||
|
||||
const mapDispatchToProps = dispatch => ({
|
||||
|
||||
onCancel() {
|
||||
dispatch(cancelQuoteCompose());
|
||||
},
|
||||
|
||||
});
|
||||
|
||||
export default connect(makeMapStateToProps, mapDispatchToProps)(QuotedStatus);
|
|
@ -53,6 +53,7 @@ const messages = defineMessages({
|
|||
reactionCry: { id: 'status.reactions.cry', defaultMessage: 'Sad' },
|
||||
reactionWeary: { id: 'status.reactions.weary', defaultMessage: 'Weary' },
|
||||
emojiPickerExpand: { id: 'status.reactions_expand', defaultMessage: 'Select emoji' },
|
||||
quotePost: { id: 'status.quote', defaultMessage: 'Quote post' },
|
||||
});
|
||||
|
||||
const mapStateToProps = state => {
|
||||
|
@ -87,6 +88,7 @@ class ActionBar extends React.PureComponent {
|
|||
status: ImmutablePropTypes.map.isRequired,
|
||||
onReply: PropTypes.func.isRequired,
|
||||
onReblog: PropTypes.func.isRequired,
|
||||
onQuote: PropTypes.func.isRequired,
|
||||
onFavourite: PropTypes.func.isRequired,
|
||||
onEmojiReact: PropTypes.func.isRequired,
|
||||
onDelete: PropTypes.func.isRequired,
|
||||
|
@ -143,6 +145,15 @@ class ActionBar extends React.PureComponent {
|
|||
}
|
||||
}
|
||||
|
||||
handleQuoteClick = () => {
|
||||
const { me, onQuote, onOpenUnauthorizedModal, status } = this.props;
|
||||
if (me) {
|
||||
onQuote(status, this.context.router.history);
|
||||
} else {
|
||||
onOpenUnauthorizedModal('REBLOG');
|
||||
}
|
||||
}
|
||||
|
||||
handleBookmarkClick = () => {
|
||||
this.props.onBookmark(this.props.status);
|
||||
}
|
||||
|
@ -486,6 +497,47 @@ class ActionBar extends React.PureComponent {
|
|||
|
||||
const reblog_disabled = (status.get('visibility') === 'direct' || status.get('visibility') === 'private');
|
||||
|
||||
let reblogButton;
|
||||
|
||||
if (me && features.quotePosts) {
|
||||
const reblogMenu = [
|
||||
{
|
||||
text: intl.formatMessage(status.get('reblogged') ? messages.cancel_reblog_private : messages.reblog),
|
||||
action: this.handleReblogClick,
|
||||
icon: require('@tabler/icons/icons/repeat.svg'),
|
||||
},
|
||||
{
|
||||
text: intl.formatMessage(messages.quotePost),
|
||||
action: this.handleQuoteClick,
|
||||
icon: require('@tabler/icons/icons/quote.svg'),
|
||||
},
|
||||
];
|
||||
|
||||
reblogButton = (
|
||||
<DropdownMenuContainer
|
||||
items={reblogMenu}
|
||||
disabled={!publicStatus}
|
||||
active={status.get('reblogged')}
|
||||
pressed={status.get('reblogged')}
|
||||
title={!publicStatus ? intl.formatMessage(messages.cannot_reblog) : intl.formatMessage(messages.reblog)}
|
||||
src={reblogIcon}
|
||||
direction='right'
|
||||
text={intl.formatMessage(messages.reblog)}
|
||||
/>
|
||||
);
|
||||
} else {
|
||||
reblogButton = (
|
||||
<IconButton
|
||||
disabled={reblog_disabled}
|
||||
active={status.get('reblogged')}
|
||||
title={reblog_disabled ? intl.formatMessage(messages.cannot_reblog) : intl.formatMessage(messages.reblog)}
|
||||
src={reblogIcon}
|
||||
onClick={this.handleReblogClick}
|
||||
text={intl.formatMessage(messages.reblog)}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<div className='detailed-status__action-bar'>
|
||||
<div className='detailed-status__button'>
|
||||
|
@ -497,14 +549,7 @@ class ActionBar extends React.PureComponent {
|
|||
/>
|
||||
</div>
|
||||
<div className='detailed-status__button'>
|
||||
<IconButton
|
||||
disabled={reblog_disabled}
|
||||
active={status.get('reblogged')}
|
||||
title={reblog_disabled ? intl.formatMessage(messages.cannot_reblog) : intl.formatMessage(messages.reblog)}
|
||||
src={reblogIcon}
|
||||
onClick={this.handleReblogClick}
|
||||
text={intl.formatMessage(messages.reblog)}
|
||||
/>
|
||||
{reblogButton}
|
||||
</div>
|
||||
<div
|
||||
className='detailed-status__button detailed-status__button--favourite'
|
||||
|
|
|
@ -9,6 +9,7 @@ import { Link, NavLink } from 'react-router-dom';
|
|||
|
||||
import HoverRefWrapper from 'soapbox/components/hover_ref_wrapper';
|
||||
import Icon from 'soapbox/components/icon';
|
||||
import QuotedStatus from 'soapbox/features/status/containers/quoted_status_container';
|
||||
import { getDomain } from 'soapbox/utils/accounts';
|
||||
|
||||
import Avatar from '../../../components/avatar';
|
||||
|
@ -156,10 +157,16 @@ class DetailedStatus extends ImmutablePureComponent {
|
|||
/>
|
||||
);
|
||||
}
|
||||
} else if (status.get('spoiler_text').length === 0) {
|
||||
} else if (status.get('spoiler_text').length === 0 && !status.get('quote')) {
|
||||
media = <Card onOpenMedia={this.props.onOpenMedia} card={status.get('card', null)} />;
|
||||
}
|
||||
|
||||
let quote;
|
||||
|
||||
if (status.get('quote')) {
|
||||
quote = <QuotedStatus statusId={status.get('quote')} />;
|
||||
}
|
||||
|
||||
if (status.get('visibility') === 'direct') {
|
||||
statusTypeIcon = <Icon src={require('@tabler/icons/icons/mail.svg')} />;
|
||||
} else if (status.get('visibility') === 'private') {
|
||||
|
@ -201,6 +208,7 @@ class DetailedStatus extends ImmutablePureComponent {
|
|||
/>
|
||||
|
||||
{media}
|
||||
{quote}
|
||||
|
||||
<div className='detailed-status__meta'>
|
||||
<StatusInteractionBar status={status} />
|
||||
|
|
|
@ -0,0 +1,164 @@
|
|||
import PropTypes from 'prop-types';
|
||||
import React from 'react';
|
||||
import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||
import ImmutablePureComponent from 'react-immutable-pure-component';
|
||||
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
|
||||
import { NavLink } from 'react-router-dom';
|
||||
|
||||
import AttachmentThumbs from 'soapbox/components/attachment_thumbs';
|
||||
import Avatar from 'soapbox/components/avatar';
|
||||
import DisplayName from 'soapbox/components/display_name';
|
||||
import IconButton from 'soapbox/components/icon_button';
|
||||
import RelativeTimestamp from 'soapbox/components/relative_timestamp';
|
||||
import { isRtl } from 'soapbox/rtl';
|
||||
|
||||
const messages = defineMessages({
|
||||
cancel: { id: 'reply_indicator.cancel', defaultMessage: 'Cancel' },
|
||||
});
|
||||
|
||||
export default @injectIntl
|
||||
class QuotedStatus extends ImmutablePureComponent {
|
||||
|
||||
static contextTypes = {
|
||||
router: PropTypes.object,
|
||||
};
|
||||
|
||||
static propTypes = {
|
||||
status: ImmutablePropTypes.map,
|
||||
onCancel: PropTypes.func,
|
||||
intl: PropTypes.object.isRequired,
|
||||
compose: PropTypes.bool,
|
||||
};
|
||||
|
||||
handleExpandClick = e => {
|
||||
const { compose, status } = this.props;
|
||||
|
||||
if (!compose && e.button === 0) {
|
||||
if (!this.context.router) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.context.router.history.push(`/@${status.getIn(['account', 'acct'])}/posts/${status.get('id')}`);
|
||||
|
||||
e.preventDefault();
|
||||
}
|
||||
}
|
||||
|
||||
handleClose = e => {
|
||||
this.props.onCancel();
|
||||
|
||||
e.preventDefault();
|
||||
}
|
||||
|
||||
renderReplyMentions = () => {
|
||||
const { status } = this.props;
|
||||
|
||||
if (!status.get('in_reply_to_id')) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const to = status.get('mentions', []);
|
||||
|
||||
if (to.size === 0) {
|
||||
if (status.get('in_reply_to_account_id') === status.getIn(['account', 'id'])) {
|
||||
return (
|
||||
<div className='reply-mentions'>
|
||||
<FormattedMessage
|
||||
id='reply_mentions.reply'
|
||||
defaultMessage='Replying to {accounts}{more}'
|
||||
values={{
|
||||
accounts: `@${status.getIn(['account', 'username'])}`,
|
||||
more: false,
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
} else {
|
||||
return (
|
||||
<div className='reply-mentions'>
|
||||
<FormattedMessage id='reply_mentions.reply_empty' defaultMessage='Replying to post' />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<div className='reply-mentions'>
|
||||
<FormattedMessage
|
||||
id='reply_mentions.reply'
|
||||
defaultMessage='Replying to {accounts}{more}'
|
||||
values={{
|
||||
accounts: to.slice(0, 2).map(account => `@${account.get('username')} `),
|
||||
more: to.size > 2 && <FormattedMessage id='reply_mentions.more' defaultMessage='and {count} more' values={{ count: to.size - 2 }} />,
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
render() {
|
||||
const { status, onCancel, intl, compose } = this.props;
|
||||
|
||||
if (!status) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const content = { __html: status.get('contentHtml') };
|
||||
const style = {
|
||||
direction: isRtl(status.get('search_index')) ? 'rtl' : 'ltr',
|
||||
};
|
||||
|
||||
const displayName = (<>
|
||||
<div className='quoted-status__display-avatar'><Avatar account={status.get('account')} size={24} /></div>
|
||||
<DisplayName account={status.get('account')} />
|
||||
</>);
|
||||
|
||||
const quotedStatus = (
|
||||
<div className='quoted-status' onClick={this.handleExpandClick} role='presentation'>
|
||||
<div className='quoted-status__info'>
|
||||
{onCancel
|
||||
? (
|
||||
<div className='reply-indicator__cancel'>
|
||||
<IconButton title={intl.formatMessage(messages.cancel)} src={require('@tabler/icons/icons/x.svg')} onClick={this.handleClose} inverted />
|
||||
</div>
|
||||
) : (
|
||||
<div className='quoted-status__relative-time'>
|
||||
<RelativeTimestamp timestamp={status.get('created_at')} />
|
||||
</div>
|
||||
)}
|
||||
{compose ? (
|
||||
<div className='quoted-status__display-name'>
|
||||
{displayName}
|
||||
</div>
|
||||
) : (
|
||||
<NavLink to={`/@${status.getIn(['account', 'acct'])}`} className='quoted-status__display-name'>
|
||||
{displayName}
|
||||
</NavLink>
|
||||
)}
|
||||
</div>
|
||||
|
||||
{this.renderReplyMentions()}
|
||||
|
||||
<div className='quoted-status__content' style={style} dangerouslySetInnerHTML={content} />
|
||||
|
||||
{status.get('media_attachments').size > 0 && (
|
||||
<AttachmentThumbs
|
||||
compact
|
||||
media={status.get('media_attachments')}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
|
||||
if (compose) {
|
||||
return (
|
||||
<div className='compose-form__quoted-status-wrapper'>
|
||||
{quotedStatus}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
return quotedStatus;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
import { connect } from 'react-redux';
|
||||
|
||||
import { makeGetStatus } from 'soapbox/selectors';
|
||||
|
||||
import QuotedStatus from '../components/quoted_status';
|
||||
|
||||
const makeMapStateToProps = () => {
|
||||
const getStatus = makeGetStatus();
|
||||
|
||||
const mapStateToProps = (state, { statusId }) => ({
|
||||
status: getStatus(state, { id: statusId }),
|
||||
});
|
||||
|
||||
return mapStateToProps;
|
||||
};
|
||||
|
||||
export default connect(makeMapStateToProps)(QuotedStatus);
|
|
@ -28,6 +28,7 @@ import {
|
|||
replyCompose,
|
||||
mentionCompose,
|
||||
directCompose,
|
||||
quoteCompose,
|
||||
} from '../../actions/compose';
|
||||
import { simpleEmojiReact } from '../../actions/emoji_reacts';
|
||||
import {
|
||||
|
@ -258,6 +259,19 @@ class Status extends ImmutablePureComponent {
|
|||
});
|
||||
}
|
||||
|
||||
handleQuoteClick = (status, e) => {
|
||||
const { askReplyConfirmation, dispatch, intl } = this.props;
|
||||
if (askReplyConfirmation) {
|
||||
dispatch(openModal('CONFIRM', {
|
||||
message: intl.formatMessage(messages.replyMessage),
|
||||
confirm: intl.formatMessage(messages.replyConfirm),
|
||||
onConfirm: () => dispatch(quoteCompose(status, this.context.router.history)),
|
||||
}));
|
||||
} else {
|
||||
dispatch(quoteCompose(status, this.context.router.history));
|
||||
}
|
||||
}
|
||||
|
||||
handleDeleteClick = (status, history, withRedraft = false) => {
|
||||
const { dispatch, intl } = this.props;
|
||||
|
||||
|
@ -681,6 +695,7 @@ class Status extends ImmutablePureComponent {
|
|||
onFavourite={this.handleFavouriteClick}
|
||||
onEmojiReact={this.handleEmojiReactClick}
|
||||
onReblog={this.handleReblogClick}
|
||||
onQuote={this.handleQuoteClick}
|
||||
onDelete={this.handleDeleteClick}
|
||||
onDirect={this.handleDirectClick}
|
||||
onChat={this.handleChatClick}
|
||||
|
|
|
@ -23,6 +23,7 @@ const mapStateToProps = state => {
|
|||
composeText: state.getIn(['compose', 'text']),
|
||||
privacy: state.getIn(['compose', 'privacy']),
|
||||
inReplyTo: state.getIn(['compose', 'in_reply_to']),
|
||||
quote: state.getIn(['compose', 'quote']),
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -35,6 +36,7 @@ class ComposeModal extends ImmutablePureComponent {
|
|||
composeText: PropTypes.string,
|
||||
privacy: PropTypes.string,
|
||||
inReplyTo: PropTypes.string,
|
||||
quote: PropTypes.string,
|
||||
dispatch: PropTypes.func.isRequired,
|
||||
};
|
||||
|
||||
|
@ -56,12 +58,14 @@ class ComposeModal extends ImmutablePureComponent {
|
|||
};
|
||||
|
||||
renderTitle = () => {
|
||||
const { privacy, inReplyTo } = this.props;
|
||||
const { privacy, inReplyTo, quote } = this.props;
|
||||
|
||||
if (privacy === 'direct') {
|
||||
return <FormattedMessage id='navigation_bar.compose_direct' defaultMessage='Direct message' />;
|
||||
} else if (inReplyTo) {
|
||||
return <FormattedMessage id='navigation_bar.compose_reply' defaultMessage='Reply to post' />;
|
||||
} else if (quote) {
|
||||
return <FormattedMessage id='navigation_bar.compose_quote' defaultMessage='Quote post' />;
|
||||
} else {
|
||||
return <FormattedMessage id='navigation_bar.compose' defaultMessage='Compose new post' />;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import { Map as ImmutableMap, fromJS } from 'immutable';
|
||||
|
||||
import { STATUS_IMPORT } from 'soapbox/actions/importer';
|
||||
import { normalizeStatus } from 'soapbox/actions/importer/normalizer';
|
||||
import {
|
||||
STATUS_CREATE_REQUEST,
|
||||
STATUS_CREATE_FAIL,
|
||||
|
@ -27,6 +28,17 @@ describe('statuses reducer', () => {
|
|||
|
||||
expect(result).toEqual(expected);
|
||||
});
|
||||
|
||||
it('preserves the quote', () => {
|
||||
const quotePost = require('soapbox/__fixtures__/pleroma-quote-post.json');
|
||||
const quotedQuotePost = require('soapbox/__fixtures__/pleroma-quote-of-quote-post.json');
|
||||
|
||||
let state = undefined;
|
||||
state = reducer(state, { type: STATUS_IMPORT, status: normalizeStatus(quotePost) });
|
||||
state = reducer(state, { type: STATUS_IMPORT, status: normalizeStatus(quotedQuotePost.pleroma.quote) });
|
||||
|
||||
expect(state.getIn(['AFmFMSpITT9xcOJKcK', 'quote'])).toEqual('AFmFLcd6XYVdjWCrOS');
|
||||
});
|
||||
});
|
||||
|
||||
describe('STATUS_CREATE_REQUEST', () => {
|
||||
|
|
|
@ -8,6 +8,8 @@ import {
|
|||
COMPOSE_CHANGE,
|
||||
COMPOSE_REPLY,
|
||||
COMPOSE_REPLY_CANCEL,
|
||||
COMPOSE_QUOTE,
|
||||
COMPOSE_QUOTE_CANCEL,
|
||||
COMPOSE_DIRECT,
|
||||
COMPOSE_MENTION,
|
||||
COMPOSE_SUBMIT_REQUEST,
|
||||
|
@ -65,6 +67,7 @@ const initialState = ImmutableMap({
|
|||
focusDate: null,
|
||||
caretPosition: null,
|
||||
in_reply_to: null,
|
||||
quote: null,
|
||||
is_composing: false,
|
||||
is_submitting: false,
|
||||
is_changing_upload: false,
|
||||
|
@ -128,6 +131,7 @@ function clearAll(state) {
|
|||
map.set('is_submitting', false);
|
||||
map.set('is_changing_upload', false);
|
||||
map.set('in_reply_to', null);
|
||||
map.set('quote', null);
|
||||
map.set('privacy', state.get('default_privacy'));
|
||||
map.set('sensitive', false);
|
||||
map.set('media_attachments', ImmutableList());
|
||||
|
@ -340,11 +344,25 @@ export default function compose(state = initialState, action) {
|
|||
map.set('spoiler_text', '');
|
||||
}
|
||||
});
|
||||
case COMPOSE_QUOTE:
|
||||
return state.withMutations(map => {
|
||||
map.set('quote', action.status.get('id'));
|
||||
map.set('to', undefined);
|
||||
map.set('text', '');
|
||||
map.set('privacy', privacyPreference(action.status.get('visibility'), state.get('default_privacy')));
|
||||
map.set('focusDate', new Date());
|
||||
map.set('caretPosition', null);
|
||||
map.set('idempotencyKey', uuid());
|
||||
map.set('content_type', state.get('default_content_type'));
|
||||
map.set('spoiler', false);
|
||||
map.set('spoiler_text', '');
|
||||
});
|
||||
case COMPOSE_SUBMIT_REQUEST:
|
||||
return state.set('is_submitting', true);
|
||||
case COMPOSE_UPLOAD_CHANGE_REQUEST:
|
||||
return state.set('is_changing_upload', true);
|
||||
case COMPOSE_REPLY_CANCEL:
|
||||
case COMPOSE_QUOTE_CANCEL:
|
||||
case COMPOSE_RESET:
|
||||
case COMPOSE_SUBMIT_SUCCESS:
|
||||
return clearAll(state);
|
||||
|
@ -390,6 +408,8 @@ export default function compose(state = initialState, action) {
|
|||
case TIMELINE_DELETE:
|
||||
if (action.id === state.get('in_reply_to')) {
|
||||
return state.set('in_reply_to', null);
|
||||
} if (action.id === state.get('quote')) {
|
||||
return state.set('quote', null);
|
||||
} else {
|
||||
return state;
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ import {
|
|||
COMPOSE_MENTION,
|
||||
COMPOSE_REPLY,
|
||||
COMPOSE_DIRECT,
|
||||
COMPOSE_QUOTE,
|
||||
} from '../actions/compose';
|
||||
import {
|
||||
SEARCH_CHANGE,
|
||||
|
@ -78,6 +79,7 @@ export default function search(state = initialState, action) {
|
|||
case COMPOSE_REPLY:
|
||||
case COMPOSE_MENTION:
|
||||
case COMPOSE_DIRECT:
|
||||
case COMPOSE_QUOTE:
|
||||
return state.set('hidden', true);
|
||||
case SEARCH_FETCH_REQUEST:
|
||||
return handleSubmitted(state, action.value);
|
||||
|
|
|
@ -43,13 +43,29 @@ const fixMentions = status => {
|
|||
return status.set('mentions', sorted);
|
||||
};
|
||||
|
||||
const fixStatus = status => {
|
||||
const isQuote = status => {
|
||||
return Boolean(status.get('quote_id') || status.getIn(['pleroma', 'quote_url']));
|
||||
};
|
||||
|
||||
// Preserve quote if an existing status already has it
|
||||
const fixQuote = (state, status) => {
|
||||
const oldStatus = state.get(status.get('id'));
|
||||
|
||||
if (oldStatus && !status.get('quote') && isQuote(status)) {
|
||||
return status.set('quote', oldStatus.get('quote'));
|
||||
} else {
|
||||
return status;
|
||||
}
|
||||
};
|
||||
|
||||
const fixStatus = (state, status) => {
|
||||
return status.withMutations(status => {
|
||||
fixMentions(status);
|
||||
fixQuote(state, status);
|
||||
});
|
||||
};
|
||||
|
||||
const importStatus = (state, status) => state.set(status.id, fixStatus(fromJS(status)));
|
||||
const importStatus = (state, status) => state.set(status.id, fixStatus(state, fromJS(status)));
|
||||
|
||||
const importStatuses = (state, statuses) =>
|
||||
state.withMutations(mutable => statuses.forEach(status => importStatus(mutable, status)));
|
||||
|
|
|
@ -78,6 +78,7 @@ export const getFeatures = createSelector([
|
|||
remoteInteractionsAPI: v.software === PLEROMA && gte(v.version, '2.4.50'),
|
||||
explicitAddressing: v.software === PLEROMA && gte(v.version, '1.0.0'),
|
||||
accountEndorsements: v.software === PLEROMA && gte(v.version, '2.4.50'),
|
||||
quotePosts: v.software === PLEROMA && gte(v.version, '2.4.50'),
|
||||
};
|
||||
});
|
||||
|
||||
|
|
|
@ -84,13 +84,27 @@
|
|||
|
||||
.spoiler-input__input { border-radius: 4px; }
|
||||
|
||||
&__quoted-status-wrapper {
|
||||
background: var(--background-color);
|
||||
|
||||
.quoted-status {
|
||||
&:hover,
|
||||
&:focus,
|
||||
&:active {
|
||||
background: transparent;
|
||||
cursor: unset;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.condensed {
|
||||
.autosuggest-textarea__textarea {
|
||||
min-height: 46px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.compose-form__buttons-wrapper {
|
||||
.compose-form__buttons-wrapper,
|
||||
.compose-form__quoted-status-wrapper {
|
||||
height: 0;
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
|
|
|
@ -62,7 +62,7 @@
|
|||
box-sizing: border-box;
|
||||
overflow: hidden;
|
||||
margin: 0 6px;
|
||||
padding: 4px 4px;
|
||||
padding: 4px;
|
||||
border-radius: 6px;
|
||||
font-size: 15px;
|
||||
text-decoration: none;
|
||||
|
|
|
@ -16,7 +16,8 @@
|
|||
}
|
||||
|
||||
.status__wrapper,
|
||||
.detailed-status {
|
||||
.detailed-status,
|
||||
.quoted-status {
|
||||
.reply-mentions {
|
||||
display: block;
|
||||
margin: 4px 0 0 0;
|
||||
|
|
|
@ -338,6 +338,16 @@
|
|||
font-weight: 500;
|
||||
color: var(--brand-color);
|
||||
}
|
||||
|
||||
&--reblog {
|
||||
> div {
|
||||
display: flex;
|
||||
|
||||
> .icon-button {
|
||||
margin-right: 8px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -751,3 +761,71 @@ a.status-card.compact:hover {
|
|||
.pending-status {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
.quoted-status {
|
||||
margin-top: 14px;
|
||||
border: 1px solid var(--brand-color--med);
|
||||
border-radius: 10px;
|
||||
padding: 12px;
|
||||
transition: background 0.2s;
|
||||
cursor: pointer;
|
||||
|
||||
&:hover,
|
||||
&:focus,
|
||||
&:active {
|
||||
background: var(--brand-color--faint);
|
||||
}
|
||||
|
||||
&__relative-time {
|
||||
padding-top: 4px;
|
||||
}
|
||||
|
||||
&__display-name {
|
||||
color: var(--primary-text-color);
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
line-height: 24px;
|
||||
overflow: hidden;
|
||||
padding-right: 25px;
|
||||
text-decoration: none;
|
||||
|
||||
.display-name__account {
|
||||
color: var(--primary-text-color--faint);
|
||||
}
|
||||
}
|
||||
|
||||
&__display-avatar {
|
||||
float: left;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.reply-mentions {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
&__content {
|
||||
margin-top: 5px;
|
||||
font-size: 14px;
|
||||
|
||||
a {
|
||||
color: var(--highlight-text-color);
|
||||
text-decoration: none;
|
||||
|
||||
&:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.attachment-thumbs .media-gallery {
|
||||
margin-top: 5px !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* Fedibird quote post compatibility */
|
||||
.status__content,
|
||||
.quoted-status__content {
|
||||
.quote-inline {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -221,7 +221,8 @@
|
|||
}
|
||||
|
||||
.status__relative-time,
|
||||
.notification__relative_time {
|
||||
.notification__relative_time,
|
||||
.quoted-status__relative-time {
|
||||
color: var(--primary-text-color--faint);
|
||||
float: right;
|
||||
font-size: 14px;
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
"@sentry/browser": "^6.12.0",
|
||||
"@sentry/react": "^6.12.0",
|
||||
"@sentry/tracing": "^6.12.0",
|
||||
"@tabler/icons": "^1.41.2",
|
||||
"@tabler/icons": "^1.53.0",
|
||||
"array-includes": "^3.0.3",
|
||||
"autoprefixer": "^10.0.0",
|
||||
"axios": "^0.21.4",
|
||||
|
|
|
@ -1519,10 +1519,10 @@
|
|||
remark "^13.0.0"
|
||||
unist-util-find-all-after "^3.0.2"
|
||||
|
||||
"@tabler/icons@^1.41.2":
|
||||
version "1.41.2"
|
||||
resolved "https://registry.yarnpkg.com/@tabler/icons/-/icons-1.41.2.tgz#effccbb261539b68609cc7dc660a058683170ee1"
|
||||
integrity sha512-X6cQmMC24hiwg0p2BzasvU3IeCCdOk0f/9d6gNNtJM4lzG2TCloTns1bVvU5MAFkITGukxUqjPFE3Ecd6kGsfw==
|
||||
"@tabler/icons@^1.53.0":
|
||||
version "1.53.0"
|
||||
resolved "https://registry.yarnpkg.com/@tabler/icons/-/icons-1.53.0.tgz#51536e01b343cfaf26b701df306b2c0369769e3c"
|
||||
integrity sha512-Skk1BqXEOEhiRsXJgZBYtjFa/+4dMSFA5UyzTUW20oyyUSd3iizhEWrYt0jT87iFu771gWoqVV2/OGobBcGjgQ==
|
||||
|
||||
"@tootallnate/once@1":
|
||||
version "1.1.2"
|
||||
|
|
Ładowanie…
Reference in New Issue