21 lines
543 B
Python
21 lines
543 B
Python
from django.conf import settings
|
|
from django.urls import re_path
|
|
|
|
from engine.vibes_auth.messaging.consumers import (
|
|
StaffInboxConsumer,
|
|
ThreadConsumer,
|
|
UserMessageConsumer,
|
|
)
|
|
|
|
messaging_urlpatters = (
|
|
[
|
|
re_path(r"^ws/chat/message$", UserMessageConsumer.as_asgi()),
|
|
re_path(r"^ws/chat/staff/$", StaffInboxConsumer.as_asgi()),
|
|
re_path(
|
|
r"^ws/chat/thread/(?P<thread_id>[0-9a-fA-F-]{36})/$",
|
|
ThreadConsumer.as_asgi(),
|
|
),
|
|
]
|
|
if settings.ALLOW_MESSAGING
|
|
else []
|
|
)
|