Before this commit, a crash occurred when the user changed after
starting a livechat conversation.
Steps to reproduce (login => logout)
- Login on admin
- Go to the website
- Start a livechat conversation
- Logout
- Start typing on the chat window composer
- Crash due to `NotFound` raised after `notify_typing`
The same error could occur the other way around (logout => login).
This error is due to the user not being a channel member after it
changed.
In order to fix this issue, livechat session is cleared when the
user changes. Indeed, it the "new" user is not linked to the livechat
conversation so it makes no sense to display it.
fixes https://github.com/odoo/odoo/issues/128206
opw-3421386
closesodoo/odoo#128595
X-original-commit: 3cea3878911831eee5abee9272c7b81145ee7128
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>