Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Pleroma
pleroma
Commits
a4abb124
Verified
Commit
a4abb124
authored
Sep 21, 2018
by
Haelwenn
Browse files
[Pleroma.Web.ActivityPub.Transmogrifier]: Fix when inReplyTo is a inlined post [kroeg]
parent
523757be
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/pleroma/web/activity_pub/transmogrifier.ex
View file @
a4abb124
...
...
@@ -96,8 +96,17 @@ def fix_likes(object) do
object
end
def
fix_in_reply_to
(%{
"inReplyTo"
=>
in_reply_to_id
}
=
object
)
when
not
is_nil
(
in_reply_to_id
)
do
def
fix_in_reply_to
(%{
"inReplyTo"
=>
in_reply_to
}
=
object
)
when
not
is_nil
(
in_reply_to
)
do
in_reply_to_id
=
if
is_bitstring
(
in_reply_to
)
do
in_reply_to
else
if
is_map
(
in_reply_to
)
&&
in_reply_to
[
"id"
]
do
in_reply_to
[
"id"
]
end
end
case
ActivityPub
.
fetch_object_from_id
(
in_reply_to_id
)
do
{
:ok
,
replied_object
}
->
with
%
Activity
{}
=
activity
<-
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment