Skip to content
Snippets Groups Projects
Commit 49aa391b authored by Denis Vermylen's avatar Denis Vermylen
Browse files

[FIX] bus: websocket http raise sessionExpired


The session used to call this websocket route needs to have been
initiated with a call to /websocket/peek_notifications first.

closes odoo/odoo#100889

Signed-off-by: default avatarJulien Castiaux <juc@odoo.com>
parent 4d6fb454
No related branches found
No related tags found
No related merge requests found
......@@ -49,6 +49,8 @@ class WebsocketController(Controller):
@route('/websocket/update_bus_presence', type='json', auth='public', cors='*')
def update_bus_presence(self, inactivity_period, im_status_ids_by_model):
if 'is_websocket_session' not in request.session:
raise SessionExpiredException()
request.env['ir.websocket']._update_bus_presence(int(inactivity_period), im_status_ids_by_model)
return {}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment