[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#102009 X-original-commit: 49aa391b4ef93b2de578c73a1fe852cea32abb43 Signed-off-by: Julien Castiaux <juc@odoo.com>
This commit is contained in:
@@ -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 {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user