diff options
-rw-r--r-- | config/config.exs | 3 | ||||
-rwxr-xr-x | installation/init.d/pleroma | 21 | ||||
-rw-r--r-- | lib/pleroma/web/mastodon_api/mastodon_api_controller.ex | 9 | ||||
-rw-r--r-- | lib/pleroma/web/twitter_api/controllers/util_controller.ex | 4 |
4 files changed, 34 insertions, 3 deletions
diff --git a/config/config.exs b/config/config.exs index 839e6bde6..08d2381b2 100644 --- a/config/config.exs +++ b/config/config.exs @@ -76,7 +76,8 @@ config :pleroma, :fe, who_to_follow_provider: "https://vinayaka.distsn.org/cgi-bin/vinayaka-user-match-osa-api.cgi?{{host}}+{{user}}", who_to_follow_link: "https://vinayaka.distsn.org/?{{host}}+{{user}}", - scope_options_enabled: false + scope_options_enabled: false, + collapse_message_with_subject: false config :pleroma, :activitypub, accept_blocks: true, diff --git a/installation/init.d/pleroma b/installation/init.d/pleroma new file mode 100755 index 000000000..9582d65d4 --- /dev/null +++ b/installation/init.d/pleroma @@ -0,0 +1,21 @@ +#!/sbin/openrc-run + +# Requires OpenRC >= 0.35 +directory=~pleroma/pleroma + +command=/usr/bin/mix +command_args="phx.server" +command_user=pleroma:pleroma +command_background=1 + +export PORT=4000 +export MIX_ENV=prod + +# Ask process to terminate within 30 seconds, otherwise kill it +retry="SIGTERM/30 SIGKILL/5" + +pidfile="/var/run/pleroma.pid" + +depend() { + need nginx postgresql +}
\ No newline at end of file diff --git a/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex b/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex index e89cd63a2..f482de6fd 100644 --- a/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex +++ b/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex @@ -1116,7 +1116,14 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do data2 = Enum.slice(data, 0, 40) |> Enum.map(fn x -> - Map.put(x, "id", User.get_or_fetch(x["acct"]).id) + Map.put( + x, + "id", + case User.get_or_fetch(x["acct"]) do + %{id: id} -> id + _ -> 0 + end + ) end) conn diff --git a/lib/pleroma/web/twitter_api/controllers/util_controller.ex b/lib/pleroma/web/twitter_api/controllers/util_controller.ex index 24ebdf007..7dbac620e 100644 --- a/lib/pleroma/web/twitter_api/controllers/util_controller.ex +++ b/lib/pleroma/web/twitter_api/controllers/util_controller.ex @@ -175,7 +175,9 @@ defmodule Pleroma.Web.TwitterAPI.UtilController do showWhoToFollowPanel: Keyword.get(@instance_fe, :show_who_to_follow_panel), scopeOptionsEnabled: Keyword.get(@instance_fe, :scope_options_enabled), whoToFollowProvider: Keyword.get(@instance_fe, :who_to_follow_provider), - whoToFollowLink: Keyword.get(@instance_fe, :who_to_follow_link) + whoToFollowLink: Keyword.get(@instance_fe, :who_to_follow_link), + collapseMessageWithSubject: + Keyword.get(@instance_fe, :collapse_message_with_subject) } } }) |