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
281806de
Verified
Commit
281806de
authored
Jun 24, 2021
by
Alex Gleason
Browse files
Activity deletion: fix FunctionClauseError
#2686
parent
f97f305d
Pipeline
#36704
passed with stages
in 10 minutes and 49 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
lib/pleroma/activity.ex
View file @
281806de
...
...
@@ -313,13 +313,15 @@ def delete_all_by_object_ap_id(id) when is_binary(id) do
def
delete_all_by_object_ap_id
(
_
),
do
:
nil
defp
purge_web_resp_cache
(%
Activity
{}
=
activity
)
do
%{
path:
path
}
=
URI
.
parse
(
activity
.
data
[
"id"
])
@cachex
.
del
(
:web_resp_cache
,
path
)
defp
purge_web_resp_cache
(%
Activity
{
data:
%{
"id"
=>
id
}}
=
activity
)
when
is_binary
(
id
)
do
with
%{
path:
path
}
<-
URI
.
parse
(
id
)
do
@cachex
.
del
(
:web_resp_cache
,
path
)
end
activity
end
defp
purge_web_resp_cache
(
nil
),
do
:
nil
defp
purge_web_resp_cache
(
activity
),
do
:
activity
def
follow_accepted?
(
%
Activity
{
data:
%{
"type"
=>
"Follow"
,
"object"
=>
followed_ap_id
}}
=
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