From 7ec61e9b7ff374797ddee944567ae74f28ca95eb Mon Sep 17 00:00:00 2001 From: Fabio Date: Fri, 27 Mar 2020 13:11:52 +0100 Subject: [PATCH] add support to "alsoKnownAs" property add "aliases" config option in me.yml --- config.py | 3 +++ config/me.sample.yml | 8 ++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/config.py b/config.py index 01c9651..205be92 100644 --- a/config.py +++ b/config.py @@ -73,6 +73,8 @@ with open(os.path.join(KEY_DIR, "me.yml")) as f: PROFILE_METADATA = conf.get("profile_metadata", {}) HIDE_FOLLOWING = conf.get("hide_following", True) + ALIASES = conf.get('aliases', []) + # Theme-related config theme_conf = conf.get("theme", {}) THEME_STYLE = ThemeStyle(theme_conf.get("style", DEFAULT_THEME_STYLE)) @@ -162,6 +164,7 @@ ME = { "url": ICON_URL, }, "publicKey": KEY.to_dict(), + "alsoKnownAs": ALIASES, } # Default emojis, space-separated, update `me.yml` to customize emojis diff --git a/config/me.sample.yml b/config/me.sample.yml index 00901b9..54e64eb 100644 --- a/config/me.sample.yml +++ b/config/me.sample.yml @@ -4,12 +4,16 @@ domain: 'your-domain.tld' https: true summary: 'your summary' icon_url: 'https://you-avatar-url' +pass: '' #favicon_url: '/static/favicon.png' -#pass: '' #profile_metadata: # name1: 'value' # name2: 'value2' -hide_following: true +#hide_following: true +#manually_approves_followers: false +#aliases: +# - "http://example.com/users/name" +# - ... #theme: # style: "light" #or "dark" # color: "#1d781d" # (green, default for light)