@@ -23,9 +23,10 @@ defmodule Pleroma.Web.ApiSpec.Schemas.Status do | |||||
application: %Schema{ | application: %Schema{ | ||||
description: "The application used to post this status", | description: "The application used to post this status", | ||||
type: :object, | type: :object, | ||||
nullable: true, | |||||
properties: %{ | properties: %{ | ||||
name: %Schema{type: :string}, | name: %Schema{type: :string}, | ||||
website: %Schema{type: :string, nullable: true, format: :uri} | |||||
website: %Schema{type: :string, format: :uri} | |||||
} | } | ||||
}, | }, | ||||
bookmarked: %Schema{type: :boolean, description: "Have you bookmarked this status?"}, | bookmarked: %Schema{type: :boolean, description: "Have you bookmarked this status?"}, | ||||
@@ -291,7 +292,7 @@ defmodule Pleroma.Web.ApiSpec.Schemas.Status do | |||||
"url" => "http://localhost:4001/users/nick6", | "url" => "http://localhost:4001/users/nick6", | ||||
"username" => "nick6" | "username" => "nick6" | ||||
}, | }, | ||||
"application" => %{"name" => "Web", "website" => nil}, | |||||
"application" => nil, | |||||
"bookmarked" => false, | "bookmarked" => false, | ||||
"card" => nil, | "card" => nil, | ||||
"content" => "foobar", | "content" => "foobar", | ||||
@@ -425,5 +425,5 @@ defmodule Pleroma.Web.MastodonAPI.StatusController do | |||||
Map.put(params, :application, %{name: client_name, website: website}) | Map.put(params, :application, %{name: client_name, website: website}) | ||||
end | end | ||||
defp put_application(params, _), do: Map.put(params, :application, %{name: "Web", website: nil}) | |||||
defp put_application(params, _), do: Map.put(params, :application, nil) | |||||
end | end |
@@ -180,7 +180,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusView do | |||||
media_attachments: reblogged[:media_attachments] || [], | media_attachments: reblogged[:media_attachments] || [], | ||||
mentions: mentions, | mentions: mentions, | ||||
tags: reblogged[:tags] || [], | tags: reblogged[:tags] || [], | ||||
application: activity_object.data["application"] || %{name: "Web", website: nil}, | |||||
application: activity_object.data["application"] || nil, | |||||
language: nil, | language: nil, | ||||
emojis: [], | emojis: [], | ||||
pleroma: %{ | pleroma: %{ | ||||
@@ -345,7 +345,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusView do | |||||
poll: render(PollView, "show.json", object: object, for: opts[:for]), | poll: render(PollView, "show.json", object: object, for: opts[:for]), | ||||
mentions: mentions, | mentions: mentions, | ||||
tags: build_tags(tags), | tags: build_tags(tags), | ||||
application: object.data["application"] || %{name: "Web", website: nil}, | |||||
application: object.data["application"] || nil, | |||||
language: nil, | language: nil, | ||||
emojis: build_emojis(object.data["emoji"]), | emojis: build_emojis(object.data["emoji"]), | ||||
pleroma: %{ | pleroma: %{ | ||||
@@ -266,10 +266,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do | |||||
url: "http://localhost:4001/tag/#{object_data["tag"]}" | url: "http://localhost:4001/tag/#{object_data["tag"]}" | ||||
} | } | ||||
], | ], | ||||
application: %{ | |||||
name: "Web", | |||||
website: nil | |||||
}, | |||||
application: nil, | |||||
language: nil, | language: nil, | ||||
emojis: [ | emojis: [ | ||||
%{ | %{ | ||||