Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
funkwhale
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
Zwordi
funkwhale
Commits
703d70d5
Verified
Commit
703d70d5
authored
6 years ago
by
Eliot Berriot
Browse files
Options
Downloads
Patches
Plain Diff
Use absolute urls
parent
0c8faf83
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
api/funkwhale_api/federation/actors.py
+17
-12
17 additions, 12 deletions
api/funkwhale_api/federation/actors.py
api/tests/federation/test_actors.py
+13
-9
13 additions, 9 deletions
api/tests/federation/test_actors.py
with
30 additions
and
21 deletions
api/funkwhale_api/federation/actors.py
+
17
−
12
View file @
703d70d5
...
...
@@ -6,6 +6,7 @@ from django.conf import settings
from
dynamic_preferences.registries
import
global_preferences_registry
from
.
import
models
from
.
import
utils
def
get_actor_data
(
actor_url
):
...
...
@@ -29,18 +30,22 @@ def get_base_system_actor_arguments(name):
'
type
'
:
'
Person
'
,
'
name
'
:
'
{}
\'
s library
'
.
format
(
settings
.
FEDERATION_HOSTNAME
),
'
manually_approves_followers
'
:
True
,
'
url
'
:
reverse
(
'
federation:instance-actors-detail
'
,
kwargs
=
{
'
actor
'
:
name
}),
'
shared_inbox_url
'
:
reverse
(
'
federation:instance-actors-inbox
'
,
kwargs
=
{
'
actor
'
:
name
}),
'
inbox_url
'
:
reverse
(
'
federation:instance-actors-inbox
'
,
kwargs
=
{
'
actor
'
:
name
}),
'
outbox_url
'
:
reverse
(
'
federation:instance-actors-outbox
'
,
kwargs
=
{
'
actor
'
:
name
}),
'
url
'
:
utils
.
full_url
(
reverse
(
'
federation:instance-actors-detail
'
,
kwargs
=
{
'
actor
'
:
name
})),
'
shared_inbox_url
'
:
utils
.
full_url
(
reverse
(
'
federation:instance-actors-inbox
'
,
kwargs
=
{
'
actor
'
:
name
})),
'
inbox_url
'
:
utils
.
full_url
(
reverse
(
'
federation:instance-actors-inbox
'
,
kwargs
=
{
'
actor
'
:
name
})),
'
outbox_url
'
:
utils
.
full_url
(
reverse
(
'
federation:instance-actors-outbox
'
,
kwargs
=
{
'
actor
'
:
name
})),
'
public_key
'
:
preferences
[
'
federation__public_key
'
],
'
summary
'
:
'
Bot account to federate with {}
\'
s library
'
.
format
(
settings
.
FEDERATION_HOSTNAME
...
...
This diff is collapsed.
Click to expand it.
api/tests/federation/test_actors.py
+
13
−
9
View file @
703d70d5
from
django.urls
import
reverse
from
funkwhale_api.federation
import
actors
from
funkwhale_api.federation
import
utils
def
test_actor_fetching
(
r_mock
):
...
...
@@ -24,15 +25,18 @@ def test_get_library(settings, preferences):
'
type
'
:
'
Person
'
,
'
name
'
:
'
{}
\'
s library
'
.
format
(
settings
.
FEDERATION_HOSTNAME
),
'
manually_approves_followers
'
:
True
,
'
url
'
:
reverse
(
'
federation:instance-actors-detail
'
,
kwargs
=
{
'
actor
'
:
'
library
'
}),
'
shared_inbox_url
'
:
reverse
(
'
federation:instance-actors-inbox
'
,
kwargs
=
{
'
actor
'
:
'
library
'
}),
'
inbox_url
'
:
reverse
(
'
federation:instance-actors-inbox
'
,
kwargs
=
{
'
actor
'
:
'
library
'
}),
'
url
'
:
utils
.
full_url
(
reverse
(
'
federation:instance-actors-detail
'
,
kwargs
=
{
'
actor
'
:
'
library
'
})),
'
shared_inbox_url
'
:
utils
.
full_url
(
reverse
(
'
federation:instance-actors-inbox
'
,
kwargs
=
{
'
actor
'
:
'
library
'
})),
'
inbox_url
'
:
utils
.
full_url
(
reverse
(
'
federation:instance-actors-inbox
'
,
kwargs
=
{
'
actor
'
:
'
library
'
})),
'
public_key
'
:
'
public_key
'
,
'
summary
'
:
'
Bot account to federate with {}
\'
s library
'
.
format
(
settings
.
FEDERATION_HOSTNAME
),
...
...
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