Fix refactoring opportunities

This commit is contained in:
miffigriffi
2019-09-22 13:41:24 +02:00
committed by Thomas Citharel
parent 4d4fdaaffe
commit 20dfce5c83
18 changed files with 122 additions and 90 deletions

View File

@@ -348,7 +348,7 @@ defmodule Mobilizon.Service.ActivityPub.Utils do
if is_nil(metadata.options) do
res
else
options = struct(Mobilizon.Events.EventOptions, metadata.options) |> Map.from_struct()
options = Events.EventOptions |> struct(metadata.options) |> Map.from_struct()
Enum.reduce(options, res, fn {key, value}, acc ->
(value && Map.put(acc, camelize(key), value)) ||