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.
closesodoo/odoo#156773
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>