forked from snarfed/bridgy-fed
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.py
More file actions
27 lines (21 loc) 路 890 Bytes
/
Copy pathapp.py
File metadata and controls
27 lines (21 loc) 路 890 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
"""Bridgy Fed user-facing app invoked by gunicorn in app.yaml.
Import all modules that define views in the app so that their URL routes get
registered.
"""
from oauth_dropins.webutil.appengine_info import DEBUG, LOCAL_SERVER
from arroba.datastore_storage import MemcacheSequences
from flask_app import app
# import all modules to register their Flask handlers
import activitypub, admin, atproto, convert, farcaster, follow, nostr, pages, redirect, ui, webfinger, web
import models
models.reset_protocol_properties()
if DEBUG or LOCAL_SERVER:
atproto.init(atproto.RemoteSequences)
else:
atproto.init(MemcacheSequences)
# only serve subscribeRepos on atproto.brid.gy (hub), not on fed.brid.gy, so
# that relays don't think they're two separate PDSes.
#
# must be before flask_app import!
import arroba.server
del arroba.server.server._methods['com.atproto.sync.subscribeRepos']