Improve the _get_link_preview_from_url method to:
- Only load necessary data (only the <head> instead of
the whole page).
- Handle optional request session.
- Handle all image mimetypes.
- Add a fallback on the <title> tag when no og:title have
been found.
Moving the method out of the model to facilitate
its use as a tool.
Task-3234864
Part-of: odoo/odoo#122087
Before this PR, link previews where not updated when a user was editing a
message.
This clear the current link previews and reprocess the updated message.
closesodoo/odoo#119917
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This commit focuses on removing all references to discuss.channel from
code located in /models of mail module.
In preparation of splitting discuss and mail modules.
Part of task-3265211
closesodoo/odoo#119413
Signed-off-by: Debondt Didier (did) <did@odoo.com>
* = bus, calendar, crm_livechat, hr, hr_holidays, im_livechat, mail_bot,
mass_mailing, privacy_lookup, test_discuss_full, test_mail,
test_mail_full, website_crm_livechat, website_livechat, base
In preparation of splitting discuss and mail modules.
Part of task-3265211
closesodoo/odoo#118354
Related: odoo/upgrade#4553
Related: odoo/enterprise#39661
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Some of our current bus notification only insert data in the models system. We
can now simplify the way we handle them by using a generic `mail.record/insert`
handler.
closesodoo/odoo#102863
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
If website is installed, the login page of Odoo has opengraph meta that will be
used to create link preview on mention and channel link.
This PR add a xpath condition to always ignore mention and channel link in the
message body.
Part of task-3000274
closesodoo/odoo#101678
X-original-commit: eb032a5c36af6402b79ae768ce29b3d84eacf3b7
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Debondt Didier (did) <did@odoo.com>
This PR fix a traceback that occure when the message body is empty (eg: only
uploading an attachment).
closesodoo/odoo#99625
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>