update mastodon instance inboxes #105

This commit is contained in:
rimu 2024-03-18 16:37:45 +13:00
parent 1a83b4775a
commit 95fe3aa32e
2 changed files with 6 additions and 0 deletions

View file

@ -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

View file

@ -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