summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Pitcock <nenolod@dereferenced.org>2018-12-04 05:01:21 +0000
committerWilliam Pitcock <nenolod@dereferenced.org>2018-12-04 05:01:21 +0000
commitd6ab701a14f7c9fb4d59953648c425e04725fc62 (patch)
tree06fef5cc26af9a11fc40d1fcd380f9477cd24385
parent419d4bd5e43248957ea66039231e3389c608368d (diff)
downloadpleroma-d6ab701a14f7c9fb4d59953648c425e04725fc62.tar.gz
pleroma-d6ab701a14f7c9fb4d59953648c425e04725fc62.zip
formatting
-rw-r--r--lib/pleroma/web/ostatus/handlers/note_handler.ex3
-rw-r--r--test/object_test.exs10
2 files changed, 9 insertions, 4 deletions
diff --git a/lib/pleroma/web/ostatus/handlers/note_handler.ex b/lib/pleroma/web/ostatus/handlers/note_handler.ex
index 39004367a..ba232b0ec 100644
--- a/lib/pleroma/web/ostatus/handlers/note_handler.ex
+++ b/lib/pleroma/web/ostatus/handlers/note_handler.ex
@@ -106,7 +106,8 @@ defmodule Pleroma.Web.OStatus.NoteHandler do
cw <- OStatus.get_cw(entry),
inReplyTo <- XML.string_from_xpath("//thr:in-reply-to[1]/@ref", entry),
inReplyToActivity <- fetch_replied_to_activity(entry, inReplyTo),
- inReplyToObject <- (inReplyToActivity && Object.normalize(inReplyToActivity.data["object"])) || nil,
+ inReplyToObject <-
+ (inReplyToActivity && Object.normalize(inReplyToActivity.data["object"])) || nil,
inReplyTo <- (inReplyToObject && inReplyToObject.data["id"]) || inReplyTo,
attachments <- OStatus.get_attachments(entry),
context <- get_context(entry, inReplyTo),
diff --git a/test/object_test.exs b/test/object_test.exs
index 3907748f7..dac6c3be7 100644
--- a/test/object_test.exs
+++ b/test/object_test.exs
@@ -52,19 +52,23 @@ defmodule Pleroma.ObjectTest do
describe "normalizer" do
test "fetches unknown objects by default" do
- %Object{} = object = Object.normalize("http://mastodon.example.org/@admin/99541947525187367")
+ %Object{} =
+ object = Object.normalize("http://mastodon.example.org/@admin/99541947525187367")
assert object.data["url"] == "http://mastodon.example.org/@admin/99541947525187367"
end
test "fetches unknown objects when fetch_remote is explicitly true" do
- %Object{} = object = Object.normalize("http://mastodon.example.org/@admin/99541947525187367", true)
+ %Object{} =
+ object = Object.normalize("http://mastodon.example.org/@admin/99541947525187367", true)
assert object.data["url"] == "http://mastodon.example.org/@admin/99541947525187367"
end
test "does not fetch unknown objects when fetch_remote is false" do
- assert is_nil(Object.normalize("http://mastodon.example.org/@admin/99541947525187367", false))
+ assert is_nil(
+ Object.normalize("http://mastodon.example.org/@admin/99541947525187367", false)
+ )
end
end
end