Commit 3ff4a06e authored by Haelwenn's avatar Haelwenn

Merge branch 'features/mastoapi-emoji-categories' into 'develop'

MastoAPI: Add categories to custom emojis

See merge request !1365
parents b972b972 252e129b
Pipeline #14488 passed with stages
in 40 minutes and 41 seconds
...@@ -27,6 +27,7 @@ Configuration: `federation_incoming_replies_max_depth` option ...@@ -27,6 +27,7 @@ Configuration: `federation_incoming_replies_max_depth` option
- Admin API: Allow querying user by ID - Admin API: Allow querying user by ID
- Added synchronization of following/followers counters for external users - Added synchronization of following/followers counters for external users
- Configuration: `enabled` option for `Pleroma.Emails.Mailer`, defaulting to `false`. - Configuration: `enabled` option for `Pleroma.Emails.Mailer`, defaulting to `false`.
- Mastodon API: Add support for categories for custom emojis by reusing the group feature. <https://github.com/tootsuite/mastodon/pull/11196>
## [1.0.0] - 2019-06-29 ## [1.0.0] - 2019-06-29
### Security ### Security
......
...@@ -299,7 +299,9 @@ defp mastodonized_emoji do ...@@ -299,7 +299,9 @@ defp mastodonized_emoji do
"static_url" => url, "static_url" => url,
"visible_in_picker" => true, "visible_in_picker" => true,
"url" => url, "url" => url,
"tags" => tags "tags" => tags,
# Assuming that a comma is authorized in the category name
"category" => (tags -- ["Custom"]) |> Enum.join(",")
} }
end) end)
end end
......
...@@ -2958,6 +2958,7 @@ test "with tags", %{conn: conn} do ...@@ -2958,6 +2958,7 @@ test "with tags", %{conn: conn} do
assert Map.has_key?(emoji, "static_url") assert Map.has_key?(emoji, "static_url")
assert Map.has_key?(emoji, "tags") assert Map.has_key?(emoji, "tags")
assert is_list(emoji["tags"]) assert is_list(emoji["tags"])
assert Map.has_key?(emoji, "category")
assert Map.has_key?(emoji, "url") assert Map.has_key?(emoji, "url")
assert Map.has_key?(emoji, "visible_in_picker") assert Map.has_key?(emoji, "visible_in_picker")
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment