diff --git a/app/activitypub/util.py b/app/activitypub/util.py index 8ba6bb77..461d8077 100644 --- a/app/activitypub/util.py +++ b/app/activitypub/util.py @@ -936,6 +936,11 @@ def refresh_instance_profile_task(instance_id: int): InstanceRole.instance_id == instance.id, InstanceRole.role == 'admin').delete() db.session.commit() + elif instance_data.status_code == 406: # Mastodon does this + instance.software = 'Mastodon' + instance.inbox = f"https://{instance.domain}/inbox" + instance.updated_at = utcnow() + db.session.commit() # alter the effect of upvotes based on their instance. Default to 1.0 diff --git a/deploy.sh b/deploy.sh index 341e8fe3..6f0fa361 100755 --- a/deploy.sh +++ b/deploy.sh @@ -4,6 +4,7 @@ date > updated.txt sudo systemctl stop celery.service git pull source venv/bin/activate +export FLASK_APP=pyfedi.py flask db upgrade pybabel compile -d app/translations sudo systemctl start celery.service