projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'fix/users_ap_id_not_null' into 'develop'
[akkoma]
/
priv
/
repo
/
migrations
/
20200406100225_users_add_emoji.exs
diff --git
a/priv/repo/migrations/20200406100225_users_add_emoji.exs
b/priv/repo/migrations/20200406100225_users_add_emoji.exs
index d0254c170b521978aacaf46a9b73210abb7ce9e3..f248108defbd11d8cc1080cd7e3298eba38af5b1 100644
(file)
--- a/
priv/repo/migrations/20200406100225_users_add_emoji.exs
+++ b/
priv/repo/migrations/20200406100225_users_add_emoji.exs
@@
-17,7
+17,10
@@
defmodule Pleroma.Repo.Migrations.UsersPopulateEmoji do
emoji =
user.source_data
|> Map.get("tag", [])
emoji =
user.source_data
|> Map.get("tag", [])
- |> Enum.filter(fn %{"type" => t} -> t == "Emoji" end)
+ |> Enum.filter(fn
+ %{"type" => "Emoji"} -> true
+ _ -> false
+ end)
|> Enum.reduce(%{}, fn %{"icon" => %{"url" => url}, "name" => name}, acc ->
Map.put(acc, String.trim(name, ":"), url)
end)
|> Enum.reduce(%{}, fn %{"icon" => %{"url" => url}, "name" => name}, acc ->
Map.put(acc, String.trim(name, ":"), url)
end)