Files
odoo_source/addons/im_livechat
Alexandre Kühn 885ae723d7 [FIX] im_livechat: mention partner in full composer should not crash
Making a mention in full composer when `im_livechat` is installed
was making the following crash:

```
TypeError: Cannot read properties of undefined (reading 'type')
    at SuggestionService.fetchSuggestions
```

Steps to reproduce:
- install module `im_livechat`
- open contacts app form view
- open full composer (e.g. Log note => expand icon)
- type @ + a character
=> throws error above

This happens because `SuggestionService` methods can optionally pass
a thread, but livechat overrides wrongfully assume they were always
provided.
This commit fixes the issue with optional chaining, taking into
account it's optional.

No test because full composer doesn't work in unit tests, tours
require adding steps blindly and I've already wasted too much time
to no avail.

closes odoo/odoo#156773

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2024-03-06 17:48:16 +00:00
..
…
…