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
b9f84a38
Commit
b9f84a38
authored
May 12, 2019
by
rinpatch
Browse files
Normalize the object only after ensuring the activity type is Create
parent
131f8832
Pipeline
#11655
passed with stages
in 6 minutes and 3 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
lib/pleroma/conversation.ex
View file @
b9f84a38
...
...
@@ -47,8 +47,8 @@ def get_for_ap_id(ap_id) do
"""
def
create_or_bump_for
(
activity
)
do
with
true
<-
Pleroma
.
Web
.
ActivityPub
.
Visibility
.
is_direct?
(
activity
),
object
<-
Pleroma
.
Object
.
normalize
(
activity
),
"Create"
<-
activity
.
data
[
"type"
],
object
<-
Pleroma
.
Object
.
normalize
(
activity
),
"Note"
<-
object
.
data
[
"type"
],
ap_id
when
is_binary
(
ap_id
)
and
byte_size
(
ap_id
)
>
0
<-
object
.
data
[
"context"
]
do
{
:ok
,
conversation
}
=
create_for_ap_id
(
ap_id
)
...
...
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