X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Femails%2Fnew_users_digest_email.ex;h=3552dedae3ddb255d8bd374008ce7f7a9de5ade2;hb=a079ec3a3cdfd42d2cbd51c7698c2c87828e5778;hp=21096a7446b4cd01168d5069269c2b5daec3320e;hpb=df0b8f1d0802a2536bf436ff8157918929a183cc;p=akkoma diff --git a/lib/pleroma/emails/new_users_digest_email.ex b/lib/pleroma/emails/new_users_digest_email.ex index 21096a744..3552dedae 100644 --- a/lib/pleroma/emails/new_users_digest_email.ex +++ b/lib/pleroma/emails/new_users_digest_email.ex @@ -1,5 +1,5 @@ # Pleroma: A lightweight social networking server -# Copyright © 2017-2019 Pleroma Authors +# Copyright © 2017-2021 Pleroma Authors # SPDX-License-Identifier: AGPL-3.0-only defmodule Pleroma.Emails.NewUsersDigestEmail do @@ -12,14 +12,12 @@ defmodule Pleroma.Emails.NewUsersDigestEmail do def new_users(to, users_and_statuses) do instance_name = Pleroma.Config.get([:instance, :name]) styling = Pleroma.Config.get([Pleroma.Emails.UserEmail, :styling]) - logo = Pleroma.Config.get([Pleroma.Emails.UserEmail, :logo]) - logo_path = - if is_nil(logo) do - Path.join(:code.priv_dir(:pleroma), "static/static/logo.png") - else - Path.join(Pleroma.Config.get([:instance, :static_dir]), logo) - end + logo_url = + Pleroma.Helpers.UriHelper.maybe_add_base( + Pleroma.Config.get([:frontend_configurations, :pleroma_fe, :logo]), + Pleroma.Web.Endpoint.url() + ) new() |> to({to.name, to.email}) @@ -29,8 +27,8 @@ defmodule Pleroma.Emails.NewUsersDigestEmail do title: "New Users", users_and_statuses: users_and_statuses, instance: instance_name, - styling: styling + styling: styling, + logo_url: logo_url }) - |> attachment(Swoosh.Attachment.new(logo_path, filename: "logo.png", type: :inline)) end end