Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
pleroma
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
io
pleroma
Commits
fb96facc
Commit
fb96facc
authored
5 years ago
by
rinpatch
Browse files
Options
Downloads
Patches
Plain Diff
Remove unused functions and fix credo issues
parent
ce23529d
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
lib/pleroma/delivery.ex
+2
-14
2 additions, 14 deletions
lib/pleroma/delivery.ex
lib/pleroma/web/activity_pub/publisher.ex
+1
-1
1 addition, 1 deletion
lib/pleroma/web/activity_pub/publisher.ex
test/web/activity_pub/publisher_test.exs
+1
-1
1 addition, 1 deletion
test/web/activity_pub/publisher_test.exs
with
4 additions
and
16 deletions
lib/pleroma/delivery.ex
+
2
−
14
View file @
fb96facc
...
...
@@ -7,9 +7,9 @@ defmodule Pleroma.Delivery do
alias
Pleroma
.
Delivery
alias
Pleroma
.
FlakeId
alias
Pleroma
.
User
alias
Pleroma
.
Repo
alias
Pleroma
.
Object
alias
Pleroma
.
Repo
alias
Pleroma
.
User
alias
Pleroma
.
User
import
Ecto
.
Changeset
...
...
@@ -39,13 +39,6 @@ def get(object_id, user_id) do
|>
Repo
.
one
()
end
def
get_or_create
(
object_id
,
user_id
)
do
case
get
(
object_id
,
user_id
)
do
%
Delivery
{}
=
delivery
->
{
:ok
,
delivery
}
nil
->
create
(
object_id
,
user_id
)
end
end
# A hack because user delete activities have a fake id for whatever reason
# TODO: Get rid of this
def
delete_all_by_object_id
(
"pleroma:fake_object_id"
),
do
:
{
0
,
[]}
...
...
@@ -54,9 +47,4 @@ def delete_all_by_object_id(object_id) do
from
(
d
in
Delivery
,
where:
d
.
object_id
==
^
object_id
)
|>
Repo
.
delete_all
()
end
def
get_all_by_object_id
(
object_id
)
do
from
(
d
in
Delivery
,
where:
d
.
object_id
==
^
object_id
)
|>
Repo
.
all
()
end
end
This diff is collapsed.
Click to expand it.
lib/pleroma/web/activity_pub/publisher.ex
+
1
−
1
View file @
fb96facc
...
...
@@ -8,8 +8,8 @@ defmodule Pleroma.Web.ActivityPub.Publisher do
alias
Pleroma
.
Delivery
alias
Pleroma
.
HTTP
alias
Pleroma
.
Instances
alias
Pleroma
.
User
alias
Pleroma
.
Object
alias
Pleroma
.
User
alias
Pleroma
.
Web
.
ActivityPub
.
Relay
alias
Pleroma
.
Web
.
ActivityPub
.
Transmogrifier
...
...
This diff is collapsed.
Click to expand it.
test/web/activity_pub/publisher_test.exs
+
1
−
1
View file @
fb96facc
...
...
@@ -10,8 +10,8 @@ defmodule Pleroma.Web.ActivityPub.PublisherTest do
import
Mock
alias
Pleroma
.
Activity
alias
Pleroma
.
Object
alias
Pleroma
.
Instances
alias
Pleroma
.
Object
alias
Pleroma
.
Web
.
ActivityPub
.
Publisher
alias
Pleroma
.
Web
.
CommonAPI
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment