projects
/
akkoma
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
fb2a8e7
)
Mastodon makes this field null when posting with MastoFE or if you choose to not...
author
Mark Felder
<feld@feld.me>
Thu, 18 Feb 2021 22:35:03 +0000
(16:35 -0600)
committer
Mark Felder
<feld@feld.me>
Thu, 18 Feb 2021 22:35:03 +0000
(16:35 -0600)
lib/pleroma/web/api_spec/schemas/status.ex
patch
|
blob
|
history
lib/pleroma/web/mastodon_api/controllers/status_controller.ex
patch
|
blob
|
history
lib/pleroma/web/mastodon_api/views/status_view.ex
patch
|
blob
|
history
test/pleroma/web/mastodon_api/views/status_view_test.exs
patch
|
blob
|
history
diff --git
a/lib/pleroma/web/api_spec/schemas/status.ex
b/lib/pleroma/web/api_spec/schemas/status.ex
index 61ebd8089c7a6256cf4df7ffb7823108b3e888cf..42fa987181946851bedc22c9546da5807faf8471 100644
(file)
--- a/
lib/pleroma/web/api_spec/schemas/status.ex
+++ b/
lib/pleroma/web/api_spec/schemas/status.ex
@@
-23,9
+23,10
@@
defmodule Pleroma.Web.ApiSpec.Schemas.Status do
application: %Schema{
description: "The application used to post this status",
type: :object,
application: %Schema{
description: "The application used to post this status",
type: :object,
+ nullable: true,
properties: %{
name: %Schema{type: :string},
properties: %{
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",
"username" => "nick6"
},
"url" => "http://localhost:4001/users/nick6",
"username" => "nick6"
},
- "application" =>
%{"name" => "Web", "website" => nil}
,
+ "application" =>
nil
,
"bookmarked" => false,
"card" => nil,
"content" => "foobar",
"bookmarked" => false,
"card" => nil,
"content" => "foobar",
diff --git
a/lib/pleroma/web/mastodon_api/controllers/status_controller.ex
b/lib/pleroma/web/mastodon_api/controllers/status_controller.ex
index db3f248e51acf6cc53722b825ffec95a542ad220..2e63c88695e9e609ab58b354d9d71cf9156540dc 100644
(file)
--- a/
lib/pleroma/web/mastodon_api/controllers/status_controller.ex
+++ b/
lib/pleroma/web/mastodon_api/controllers/status_controller.ex
@@
-425,5
+425,5
@@
defmodule Pleroma.Web.MastodonAPI.StatusController do
Map.put(params, :application, %{name: client_name, website: website})
end
Map.put(params, :application, %{name: client_name, website: website})
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
diff --git
a/lib/pleroma/web/mastodon_api/views/status_view.ex
b/lib/pleroma/web/mastodon_api/views/status_view.ex
index 38960c25616a481ebb7babfc7d52091c0c47b5da..a456509883273b8f5e2729316dcc8a0e2c83a65b 100644
(file)
--- a/
lib/pleroma/web/mastodon_api/views/status_view.ex
+++ b/
lib/pleroma/web/mastodon_api/views/status_view.ex
@@
-180,7
+180,7
@@
defmodule Pleroma.Web.MastodonAPI.StatusView do
media_attachments: reblogged[:media_attachments] || [],
mentions: mentions,
tags: reblogged[:tags] || [],
media_attachments: reblogged[:media_attachments] || [],
mentions: mentions,
tags: reblogged[:tags] || [],
- application: activity_object.data["application"] ||
%{name: "Web", website: nil}
,
+ application: activity_object.data["application"] ||
nil
,
language: nil,
emojis: [],
pleroma: %{
language: nil,
emojis: [],
pleroma: %{
@@
-345,7
+345,7
@@
defmodule Pleroma.Web.MastodonAPI.StatusView do
poll: render(PollView, "show.json", object: object, for: opts[:for]),
mentions: mentions,
tags: build_tags(tags),
poll: render(PollView, "show.json", object: object, for: opts[:for]),
mentions: mentions,
tags: build_tags(tags),
- application: object.data["application"] ||
%{name: "Web", website: nil}
,
+ application: object.data["application"] ||
nil
,
language: nil,
emojis: build_emojis(object.data["emoji"]),
pleroma: %{
language: nil,
emojis: build_emojis(object.data["emoji"]),
pleroma: %{
diff --git
a/test/pleroma/web/mastodon_api/views/status_view_test.exs
b/test/pleroma/web/mastodon_api/views/status_view_test.exs
index ed59cf285652cab805ea999b225c8d672cc26975..2de3afc4fb15f59dfb3f2b58ba584409fd09f678 100644
(file)
--- a/
test/pleroma/web/mastodon_api/views/status_view_test.exs
+++ b/
test/pleroma/web/mastodon_api/views/status_view_test.exs
@@
-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,
emojis: [
%{
language: nil,
emojis: [
%{