Allow actor id to be specified in config

This is useful if the actor won't be at the root of the domain.
This commit is contained in:
Kevin Wallace 2022-11-04 00:34:04 -07:00 committed by Thomas Sileo
parent 0badf0bc1f
commit 2843155501
3 changed files with 6 additions and 0 deletions

View file

@ -90,6 +90,7 @@ class Config(pydantic.BaseModel):
name: str
summary: str
https: bool
id: str = None
icon_url: str
secret: str
debug: bool = False
@ -146,6 +147,8 @@ CONFIG = load_config()
DOMAIN = CONFIG.domain
_SCHEME = "https" if CONFIG.https else "http"
ID = f"{_SCHEME}://{DOMAIN}"
if CONFIG.id:
ID = CONFIG.id
USERNAME = CONFIG.username
MANUALLY_APPROVES_FOLLOWERS = CONFIG.manually_approves_followers
HIDES_FOLLOWERS = CONFIG.hides_followers