summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/pleroma/web/mastodon_api/views/status_view.ex8
-rw-r--r--test/web/twitter_api/util_controller_test.exs1
2 files changed, 7 insertions, 2 deletions
diff --git a/lib/pleroma/web/mastodon_api/views/status_view.ex b/lib/pleroma/web/mastodon_api/views/status_view.ex
index d1b11d4f1..c0e289ef8 100644
--- a/lib/pleroma/web/mastodon_api/views/status_view.ex
+++ b/lib/pleroma/web/mastodon_api/views/status_view.ex
@@ -192,8 +192,12 @@ defmodule Pleroma.Web.MastodonAPI.StatusView do
page_url = page_url_data |> to_string
image_url =
- URI.merge(page_url_data, URI.parse(rich_media[:image]))
- |> to_string
+ if rich_media[:image] != nil do
+ URI.merge(page_url_data, URI.parse(rich_media[:image]))
+ |> to_string
+ else
+ nil
+ end
site_name = rich_media[:site_name] || page_url_data.host
diff --git a/test/web/twitter_api/util_controller_test.exs b/test/web/twitter_api/util_controller_test.exs
index dc9bad369..8e152ecd4 100644
--- a/test/web/twitter_api/util_controller_test.exs
+++ b/test/web/twitter_api/util_controller_test.exs
@@ -36,6 +36,7 @@ defmodule Pleroma.Web.TwitterAPI.UtilControllerTest do
describe "GET /api/statusnet/config.json" do
test "it returns the managed config", %{conn: conn} do
Pleroma.Config.put([:instance, :managed_config], false)
+ Pleroma.Config.put([:fe, :theme], "rei-ayanami-towel")
response =
conn