Correspondent in thread can be null and lead into crash when getting thread action and im status. Replace correspondent with chatPartner when type is chat. The fix is to solve the problem so that it is not blocking systray and chatWindow tests related. Also, this fix small issue of systray overflowing issue. closes odoo/odoo#138913 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>