diff --git a/INSTALL.md b/INSTALL.md index 6b81743c..0ee56255 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -219,7 +219,7 @@ The site will still run without federation. You can create local communities and My way around this is to use ngrok.com, which is a quick and simple way to create a temporary VPN with a domain and SSL. The free plan comes with ephermeral domain names that change every few days, which will break federation, or one randomly-named static domain that will need re-launching every few days. $10 per month will get you https://yourwhatever.ngrok.app which won't change. -Once you have ngrok working, edit the `.env` file and change the `SERVER_NAME` variable to your new domain name. +Once you have ngrok working, edit the `.env` file and change the `SERVER_NAME` variable to your new domain name (all lower case).
diff --git a/app/community/util.py b/app/community/util.py index 17b75643..9abffe5c 100644 --- a/app/community/util.py +++ b/app/community/util.py @@ -36,6 +36,10 @@ def search_for_community(address: str): reason = f" Reason: {banned.reason}" if banned.reason is not None else '' raise Exception(f"{server} is blocked.{reason}") # todo: create custom exception class hierarchy + if current_app.config['SERVER_NAME'] == server: + already_exists = Community.query.filter_by(name=name, ap_id=None).first() + return already_exists + already_exists = Community.query.filter_by(ap_id=address[1:]).first() if already_exists: return already_exists