Improve chat experience and begin search implementation
This commit is contained in:
15
app/asgi.py
15
app/asgi.py
@@ -13,4 +13,17 @@ from django.core.asgi import get_asgi_application
|
||||
|
||||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "app.settings")
|
||||
|
||||
application = get_asgi_application()
|
||||
django_asgi_app = get_asgi_application()
|
||||
|
||||
|
||||
async def application(scope, receive, send):
|
||||
if scope.get("type") == "websocket":
|
||||
path = scope.get("path", "")
|
||||
if path == "/ws/compose/thread/":
|
||||
from core.realtime.compose_ws import compose_ws_application
|
||||
|
||||
await compose_ws_application(scope, receive, send)
|
||||
return
|
||||
await send({"type": "websocket.close", "code": 4404})
|
||||
return
|
||||
await django_asgi_app(scope, receive, send)
|
||||
|
||||
Reference in New Issue
Block a user