aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/web/common_api/common_api.ex
diff options
context:
space:
mode:
authorlambda <lain@soykaf.club>2019-03-13 09:09:44 +0000
committerlambda <lain@soykaf.club>2019-03-13 09:09:44 +0000
commit92a0210fb03ca3e0aefe769fb6b0ab7bda6e5336 (patch)
tree56e78105e29834c60f73c1bf8c39a983d88421a4 /lib/pleroma/web/common_api/common_api.ex
parentd0e94d5f1baac7a19d6cdd33b1f54470041e7227 (diff)
parentd43b1c0b5d203fd4f195951ac7b60b666a43914f (diff)
downloadpleroma-92a0210fb03ca3e0aefe769fb6b0ab7bda6e5336.tar.gz
Merge branch 'features/add-credo-to-ci' into 'develop'
Add credo to CI See merge request pleroma/pleroma!902
Diffstat (limited to 'lib/pleroma/web/common_api/common_api.ex')
-rw-r--r--lib/pleroma/web/common_api/common_api.ex18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/pleroma/web/common_api/common_api.ex b/lib/pleroma/web/common_api/common_api.ex
index 07bd6548a..12b3d308c 100644
--- a/lib/pleroma/web/common_api/common_api.ex
+++ b/lib/pleroma/web/common_api/common_api.ex
@@ -3,14 +3,14 @@
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.CommonAPI do
- alias Pleroma.User
- alias Pleroma.Repo
alias Pleroma.Activity
+ alias Pleroma.Formatter
alias Pleroma.Object
+ alias Pleroma.Repo
alias Pleroma.ThreadMute
+ alias Pleroma.User
alias Pleroma.Web.ActivityPub.ActivityPub
alias Pleroma.Web.ActivityPub.Utils
- alias Pleroma.Formatter
import Pleroma.Web.CommonAPI.Utils
@@ -88,8 +88,8 @@ defmodule Pleroma.Web.CommonAPI do
nil ->
"public"
- inReplyTo ->
- Pleroma.Web.MastodonAPI.StatusView.get_visibility(inReplyTo.data["object"])
+ in_reply_to ->
+ Pleroma.Web.MastodonAPI.StatusView.get_visibility(in_reply_to.data["object"])
end
end
@@ -101,15 +101,15 @@ defmodule Pleroma.Web.CommonAPI do
with status <- String.trim(status),
attachments <- attachments_from_ids(data),
- inReplyTo <- get_replied_to_activity(data["in_reply_to_status_id"]),
+ in_reply_to <- get_replied_to_activity(data["in_reply_to_status_id"]),
{content_html, mentions, tags} <-
make_content_html(
status,
attachments,
data
),
- {to, cc} <- to_for_user_and_mentions(user, mentions, inReplyTo, visibility),
- context <- make_context(inReplyTo),
+ {to, cc} <- to_for_user_and_mentions(user, mentions, in_reply_to, visibility),
+ context <- make_context(in_reply_to),
cw <- data["spoiler_text"],
full_payload <- String.trim(status <> (data["spoiler_text"] || "")),
length when length in 1..limit <- String.length(full_payload),
@@ -120,7 +120,7 @@ defmodule Pleroma.Web.CommonAPI do
context,
content_html,
attachments,
- inReplyTo,
+ in_reply_to,
tags,
cw,
cc