Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
pleroma
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
370
Issues
370
List
Boards
Labels
Service Desk
Milestones
Merge Requests
54
Merge Requests
54
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Pleroma
pleroma
Commits
1555b7fa
Commit
1555b7fa
authored
Feb 21, 2018
by
lain
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add AP fixup task.
parent
88950880
Pipeline
#794
failed with stage
in 2 minutes and 11 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
+20
-0
lib/mix/tasks/fix_ap_users.ex
lib/mix/tasks/fix_ap_users.ex
+20
-0
No files found.
lib/mix/tasks/fix_ap_users.ex
0 → 100644
View file @
1555b7fa
defmodule
Mix
.
Tasks
.
FixApUsers
do
use
Mix
.
Task
import
Mix
.
Ecto
import
Ecto
.
Query
alias
Pleroma
.
{
Repo
,
User
}
@shortdoc
"Grab all ap users again"
def
run
([])
do
Mix
.
Task
.
run
(
"app.start"
)
q
=
from
u
in
User
,
where:
fragment
(
"? @> ?"
,
u
.
info
,
^
%{
"ap_enabled"
=>
true
})
users
=
Repo
.
all
(
q
)
Enum
.
each
(
users
,
fn
(
user
)
->
IO
.
puts
(
"Fetching
#{
user
.
nickname
}
"
)
Pleroma
.
Web
.
ActivityPub
.
Transmogrifier
.
upgrade_user_from_ap_id
(
user
.
ap_id
)
end
)
end
end
Write
Preview
Markdown
is supported
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