Refactor Core things, including Ecto handling, ActivityPub & Transmogrifier modules
* Data doesn't need anymore to be converted to ActivityStream format to be saved (this was taken from Pleroma and not at all a good idea here) * Everything saved when creating an event is inserted into PostgreSQL in a single transaction
This commit is contained in:
@@ -155,7 +155,7 @@ defmodule MobilizonWeb.Resolvers.Person do
|
||||
if Map.has_key?(args, key) && !is_nil(args[key][:picture]) do
|
||||
pic = args[key][:picture]
|
||||
|
||||
with {:ok, %{"name" => name, "url" => [%{"href" => url, "mediaType" => content_type}]}} <-
|
||||
with {:ok, %{name: name, url: url, content_type: content_type, size: _size}} <-
|
||||
MobilizonWeb.Upload.store(pic.file, type: key, description: pic.alt) do
|
||||
Map.put(args, key, %{"name" => name, "url" => url, "mediaType" => content_type})
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user