fanout / django-eventstream

Server-Sent Events for Django
MIT License
638 stars 84 forks source link

http_request is missing sessions attribute #60

Closed bjmnbraun closed 3 years ago

bjmnbraun commented 3 years ago

Django documentation for contrib AuthMiddleware and SessionMiddleware specify that request.user and request.session are available within views.

django-eventstream populates request.user only, so this means when creating a custom ChannelManager get_channels_for_request has access to request.user but has to use request.scope["session"] to get to the session.

jkarneges commented 3 years ago

Fixed in #61