mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-05-08 04:42:39 +00:00
Compare commits
6 commits
b289bda90e
...
b38c0aa495
Author | SHA1 | Date | |
---|---|---|---|
b38c0aa495 | |||
50af909c01 | |||
6f6bede900 | |||
87b8ac3ce6 | |||
a299ddb10e | |||
1ab4ab8d38 |
0
changelog.d/3907.skip
Normal file
0
changelog.d/3907.skip
Normal file
1
changelog.d/card-image-description.add
Normal file
1
changelog.d/card-image-description.add
Normal file
|
@ -0,0 +1 @@
|
|||
Include image description in status media cards
|
1
changelog.d/receiverworker-error-handling.fix
Normal file
1
changelog.d/receiverworker-error-handling.fix
Normal file
|
@ -0,0 +1 @@
|
|||
ReceiverWorker: Make sure non-{:ok, _} is returned as {:error, …}
|
|
@ -58,6 +58,10 @@ defmodule Pleroma.Web.ApiSpec.Schemas.Status do
|
|||
format: :uri,
|
||||
description: "Preview thumbnail"
|
||||
},
|
||||
image_description: %Schema{
|
||||
type: :string,
|
||||
description: "Alternate text that describes what is in the thumbnail"
|
||||
},
|
||||
title: %Schema{type: :string, description: "Title of linked resource"},
|
||||
description: %Schema{type: :string, description: "Description of preview"}
|
||||
}
|
||||
|
|
|
@ -589,6 +589,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusView do
|
|||
provider_url: page_url_data.scheme <> "://" <> page_url_data.host,
|
||||
url: page_url,
|
||||
image: image_url,
|
||||
image_description: rich_media["image:alt"] || "",
|
||||
title: rich_media["title"] || "",
|
||||
description: rich_media["description"] || "",
|
||||
pleroma: %{
|
||||
|
|
|
@ -52,7 +52,8 @@ defmodule Pleroma.Workers.ReceiverWorker do
|
|||
{:error, {:reject, reason}} -> {:cancel, reason}
|
||||
{:signature, false} -> {:cancel, :invalid_signature}
|
||||
{:error, {:error, reason = "Object has been deleted"}} -> {:cancel, reason}
|
||||
e -> e
|
||||
{:error, _} = e -> e
|
||||
e -> {:error, e}
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -5973,3 +5973,87 @@ msgstr ""
|
|||
msgctxt "config label at :pleroma-:instance > :languages"
|
||||
msgid "Languages"
|
||||
msgstr ""
|
||||
|
||||
#: lib/pleroma/docs/translator.ex:5
|
||||
#, elixir-autogen, elixir-format
|
||||
msgctxt "config description at :pleroma-:mrf_emoji"
|
||||
msgid "Reject or force-unlisted emojis whose URLs or names match a keyword or [Regex](https://hexdocs.pm/elixir/Regex.html)."
|
||||
msgstr ""
|
||||
|
||||
#: lib/pleroma/docs/translator.ex:5
|
||||
#, elixir-autogen, elixir-format
|
||||
msgctxt "config description at :pleroma-:mrf_emoji > :federated_timeline_removal_shortcode"
|
||||
msgid " A list of patterns which result in message with emojis whose shortcodes match being removed from federated timelines (a.k.a unlisted). This will apply only to statuses.\n\n Each pattern can be a string or [Regex](https://hexdocs.pm/elixir/Regex.html) in the format of `~r/PATTERN/`.\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/pleroma/docs/translator.ex:5
|
||||
#, elixir-autogen, elixir-format
|
||||
msgctxt "config description at :pleroma-:mrf_emoji > :federated_timeline_removal_url"
|
||||
msgid " A list of patterns which result in message with emojis whose URLs match being removed from federated timelines (a.k.a unlisted). This will apply only to statuses.\n\n Each pattern can be a string or [Regex](https://hexdocs.pm/elixir/Regex.html) in the format of `~r/PATTERN/`.\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/pleroma/docs/translator.ex:5
|
||||
#, elixir-autogen, elixir-format
|
||||
msgctxt "config description at :pleroma-:mrf_emoji > :remove_shortcode"
|
||||
msgid " A list of patterns which result in emoji whose shortcode matches being removed from the message. This will apply to statuses, emoji reactions, and user profiles.\n\n Each pattern can be a string or [Regex](https://hexdocs.pm/elixir/Regex.html) in the format of `~r/PATTERN/`.\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/pleroma/docs/translator.ex:5
|
||||
#, elixir-autogen, elixir-format
|
||||
msgctxt "config description at :pleroma-:mrf_emoji > :remove_url"
|
||||
msgid " A list of patterns which result in emoji whose URL matches being removed from the message. This will apply to statuses, emoji reactions, and user profiles.\n\n Each pattern can be a string or [Regex](https://hexdocs.pm/elixir/Regex.html) in the format of `~r/PATTERN/`.\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/pleroma/docs/translator.ex:5
|
||||
#, elixir-autogen, elixir-format
|
||||
msgctxt "config description at :pleroma-Pleroma.User.Backup > :process_chunk_size"
|
||||
msgid "The number of activities to fetch in the backup job for each chunk."
|
||||
msgstr ""
|
||||
|
||||
#: lib/pleroma/docs/translator.ex:5
|
||||
#, elixir-autogen, elixir-format
|
||||
msgctxt "config description at :pleroma-Pleroma.User.Backup > :process_wait_time"
|
||||
msgid "The amount of time to wait for backup to report progress, in milliseconds. If no progress is received from the backup job for that much time, terminate it and deem it failed."
|
||||
msgstr ""
|
||||
|
||||
#: lib/pleroma/docs/translator.ex:5
|
||||
#, elixir-autogen, elixir-format
|
||||
msgctxt "config label at :pleroma-:mrf_emoji"
|
||||
msgid "MRF Emoji"
|
||||
msgstr ""
|
||||
|
||||
#: lib/pleroma/docs/translator.ex:5
|
||||
#, elixir-autogen, elixir-format
|
||||
msgctxt "config label at :pleroma-:mrf_emoji > :federated_timeline_removal_shortcode"
|
||||
msgid "Federated timeline removal shortcode"
|
||||
msgstr ""
|
||||
|
||||
#: lib/pleroma/docs/translator.ex:5
|
||||
#, elixir-autogen, elixir-format
|
||||
msgctxt "config label at :pleroma-:mrf_emoji > :federated_timeline_removal_url"
|
||||
msgid "Federated timeline removal url"
|
||||
msgstr ""
|
||||
|
||||
#: lib/pleroma/docs/translator.ex:5
|
||||
#, elixir-autogen, elixir-format
|
||||
msgctxt "config label at :pleroma-:mrf_emoji > :remove_shortcode"
|
||||
msgid "Remove shortcode"
|
||||
msgstr ""
|
||||
|
||||
#: lib/pleroma/docs/translator.ex:5
|
||||
#, elixir-autogen, elixir-format
|
||||
msgctxt "config label at :pleroma-:mrf_emoji > :remove_url"
|
||||
msgid "Remove url"
|
||||
msgstr ""
|
||||
|
||||
#: lib/pleroma/docs/translator.ex:5
|
||||
#, elixir-autogen, elixir-format
|
||||
msgctxt "config label at :pleroma-Pleroma.User.Backup > :process_chunk_size"
|
||||
msgid "Process Chunk Size"
|
||||
msgstr ""
|
||||
|
||||
#: lib/pleroma/docs/translator.ex:5
|
||||
#, elixir-autogen, elixir-format
|
||||
msgctxt "config label at :pleroma-Pleroma.User.Backup > :process_wait_time"
|
||||
msgid "Process Wait Time"
|
||||
msgstr ""
|
||||
|
|
|
@ -110,7 +110,7 @@ msgstr ""
|
|||
msgid "Can't display this activity"
|
||||
msgstr ""
|
||||
|
||||
#: lib/pleroma/web/mastodon_api/controllers/account_controller.ex:334
|
||||
#: lib/pleroma/web/mastodon_api/controllers/account_controller.ex:346
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Can't find user"
|
||||
msgstr ""
|
||||
|
@ -198,7 +198,7 @@ msgstr ""
|
|||
msgid "Invalid password."
|
||||
msgstr ""
|
||||
|
||||
#: lib/pleroma/web/mastodon_api/controllers/account_controller.ex:267
|
||||
#: lib/pleroma/web/mastodon_api/controllers/account_controller.ex:279
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Invalid request"
|
||||
msgstr ""
|
||||
|
@ -225,7 +225,7 @@ msgstr ""
|
|||
#: lib/pleroma/web/feed/tag_controller.ex:16
|
||||
#: lib/pleroma/web/feed/user_controller.ex:69
|
||||
#: lib/pleroma/web/o_status/o_status_controller.ex:132
|
||||
#: lib/pleroma/web/plugs/uploaded_media.ex:104
|
||||
#: lib/pleroma/web/plugs/uploaded_media.ex:84
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Not found"
|
||||
msgstr ""
|
||||
|
@ -235,7 +235,7 @@ msgstr ""
|
|||
msgid "Poll's author can't vote"
|
||||
msgstr ""
|
||||
|
||||
#: lib/pleroma/web/mastodon_api/controllers/account_controller.ex:499
|
||||
#: lib/pleroma/web/mastodon_api/controllers/account_controller.ex:511
|
||||
#: lib/pleroma/web/mastodon_api/controllers/fallback_controller.ex:20
|
||||
#: lib/pleroma/web/mastodon_api/controllers/poll_controller.ex:39
|
||||
#: lib/pleroma/web/mastodon_api/controllers/poll_controller.ex:51
|
||||
|
@ -341,7 +341,7 @@ msgstr ""
|
|||
msgid "CAPTCHA expired"
|
||||
msgstr ""
|
||||
|
||||
#: lib/pleroma/web/plugs/uploaded_media.ex:77
|
||||
#: lib/pleroma/web/plugs/uploaded_media.ex:57
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Failed"
|
||||
msgstr ""
|
||||
|
@ -361,7 +361,7 @@ msgstr ""
|
|||
msgid "Insufficient permissions: %{permissions}."
|
||||
msgstr ""
|
||||
|
||||
#: lib/pleroma/web/plugs/uploaded_media.ex:131
|
||||
#: lib/pleroma/web/plugs/uploaded_media.ex:111
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Internal Error"
|
||||
msgstr ""
|
||||
|
@ -557,7 +557,7 @@ msgstr ""
|
|||
msgid "Access denied"
|
||||
msgstr ""
|
||||
|
||||
#: lib/pleroma/web/mastodon_api/controllers/account_controller.ex:331
|
||||
#: lib/pleroma/web/mastodon_api/controllers/account_controller.ex:343
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "This API requires an authenticated user"
|
||||
msgstr ""
|
||||
|
@ -567,7 +567,7 @@ msgstr ""
|
|||
msgid "User is not an admin."
|
||||
msgstr ""
|
||||
|
||||
#: lib/pleroma/user/backup.ex:73
|
||||
#: lib/pleroma/user/backup.ex:78
|
||||
#, elixir-format
|
||||
msgid "Last export was less than a day ago"
|
||||
msgid_plural "Last export was less than %{days} days ago"
|
||||
|
@ -607,3 +607,23 @@ msgstr ""
|
|||
#, elixir-autogen, elixir-format
|
||||
msgid "User isn't privileged."
|
||||
msgstr ""
|
||||
|
||||
#: lib/pleroma/web/mastodon_api/controllers/account_controller.ex:267
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Bio is too long"
|
||||
msgstr ""
|
||||
|
||||
#: lib/pleroma/web/mastodon_api/controllers/account_controller.ex:270
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Name is too long"
|
||||
msgstr ""
|
||||
|
||||
#: lib/pleroma/web/mastodon_api/controllers/account_controller.ex:273
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "One or more field entries are too long"
|
||||
msgstr ""
|
||||
|
||||
#: lib/pleroma/web/mastodon_api/controllers/account_controller.ex:276
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Too many field entries"
|
||||
msgstr ""
|
||||
|
|
|
@ -219,3 +219,43 @@ msgstr ""
|
|||
#, elixir-autogen, elixir-format
|
||||
msgid "read:mutes"
|
||||
msgstr ""
|
||||
|
||||
#: lib/pleroma/web/api_spec/scopes/translator.ex:5
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "push"
|
||||
msgstr ""
|
||||
|
||||
#: lib/pleroma/web/api_spec/scopes/translator.ex:5
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "read:backups"
|
||||
msgstr ""
|
||||
|
||||
#: lib/pleroma/web/api_spec/scopes/translator.ex:5
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "read:chats"
|
||||
msgstr ""
|
||||
|
||||
#: lib/pleroma/web/api_spec/scopes/translator.ex:5
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "read:media"
|
||||
msgstr ""
|
||||
|
||||
#: lib/pleroma/web/api_spec/scopes/translator.ex:5
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "read:reports"
|
||||
msgstr ""
|
||||
|
||||
#: lib/pleroma/web/api_spec/scopes/translator.ex:5
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "write:chats"
|
||||
msgstr ""
|
||||
|
||||
#: lib/pleroma/web/api_spec/scopes/translator.ex:5
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "write:follow"
|
||||
msgstr ""
|
||||
|
||||
#: lib/pleroma/web/api_spec/scopes/translator.ex:5
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "write:reports"
|
||||
msgstr ""
|
||||
|
|
|
@ -1717,6 +1717,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusControllerTest do
|
|||
|
||||
card_data = %{
|
||||
"image" => "http://ia.media-imdb.com/images/rock.jpg",
|
||||
"image_description" => "",
|
||||
"provider_name" => "example.com",
|
||||
"provider_url" => "https://example.com",
|
||||
"title" => "The Rock",
|
||||
|
@ -1770,6 +1771,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusControllerTest do
|
|||
"title" => "Pleroma",
|
||||
"description" => "",
|
||||
"image" => nil,
|
||||
"image_description" => "",
|
||||
"provider_name" => "example.com",
|
||||
"provider_url" => "https://example.com",
|
||||
"url" => "https://example.com/ogp-missing-data",
|
||||
|
|
|
@ -773,6 +773,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do
|
|||
page_url = "http://example.com"
|
||||
|
||||
card = %{
|
||||
"image:alt" => "Example image description",
|
||||
url: page_url,
|
||||
site_name: "Example site name",
|
||||
title: "Example website",
|
||||
|
@ -780,7 +781,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do
|
|||
description: "Example description"
|
||||
}
|
||||
|
||||
%{provider_name: "example.com"} =
|
||||
%{provider_name: "example.com", image_description: "Example image description"} =
|
||||
StatusView.render("card.json", %{page_url: page_url, rich_media: card})
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue