root: add Channels Message Storage and consumer

This commit is contained in:
Jens Langhammer
2020-11-26 17:08:26 +01:00
parent 7efed56acc
commit 9c00c86e9b
5 changed files with 62 additions and 1 deletions

View File

@ -1,6 +1,11 @@
"""root Websocket URLS"""
from channels.auth import AuthMiddlewareStack
from django.urls import path
from passbook.outposts.channels import OutpostConsumer
from passbook.root.messages.consumer import MessageConsumer
websocket_urlpatterns = [path("ws/outpost/<uuid:pk>/", OutpostConsumer.as_asgi())]
websocket_urlpatterns = [
path("ws/outpost/<uuid:pk>/", OutpostConsumer.as_asgi()),
path("ws/client/", AuthMiddlewareStack(MessageConsumer.as_asgi())),
]