diff options
author | Wim Vanderbauwhede <Wim.Vanderbauwhede@mail.be> | 2019-01-04 15:22:02 +0000 |
---|---|---|
committer | Wim Vanderbauwhede <Wim.Vanderbauwhede@mail.be> | 2019-01-04 15:22:02 +0000 |
commit | fe2dceb66d056809d9a145773a8053ac9fb02658 (patch) | |
tree | 1d4a2ca7482232baee06b27de15ae317e2aaf097 | |
parent | d9d62a110c192627d71a043418f536d29942c8f0 (diff) | |
download | pleroma-fe2dceb66d056809d9a145773a8053ac9fb02658.tar.gz |
Patch to support image descriptions in Pleroma FE
-rw-r--r-- | lib/pleroma/web/common_api/utils.ex | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/pleroma/web/common_api/utils.ex b/lib/pleroma/web/common_api/utils.ex index 3ff9f9452..51e74ac8f 100644 --- a/lib/pleroma/web/common_api/utils.ex +++ b/lib/pleroma/web/common_api/utils.ex @@ -1,8 +1,9 @@ # Pleroma: A lightweight social networking server -# Copyright © 2017-2019 Pleroma Authors <https://pleroma.social/> +# Copyright © 2017-2018 Pleroma Authors <https://pleroma.social/> # SPDX-License-Identifier: AGPL-3.0-only defmodule Pleroma.Web.CommonAPI.Utils do + require Logger alias Calendar.Strftime alias Comeonin.Pbkdf2 alias Pleroma.{Activity, Formatter, Object, Repo} @@ -32,9 +33,11 @@ defmodule Pleroma.Web.CommonAPI.Utils do def get_replied_to_activity(_), do: nil - def attachments_from_ids(ids) do - Enum.map(ids || [], fn media_id -> + def attachments_from_ids(ids, descs) do + Enum.map(ids || [], fn media_id -> do + Logger.warn(descs[media_id]) Repo.get(Object, media_id).data + end end) end |