Skip to content
Snippets Groups Projects
Commit 6f43977a authored by XavierDo's avatar XavierDo Committed by Thibault Delavallée
Browse files

[REF] mail: improve message_post and message_notify API

Message post should always be called on a record (ensure_one). That way we
ensure posting a message is always done in a record's context with right
values computed (reply_to, followers, ...)

Message_notify can be called on record or on mail_thread and must have
partner_ids. It is based on the recently modified user_notification mechanism
and allow to notify a partner on a record or just to push him a message
(aka, not linked to a record).

Small performance improvement

  * browse recipients instead of search in _notify_email_recipients;
  * todo in future optimizations: mayybe be improve by searching on ids
    and is_blacklist immediately;

Related to task 1943901
Linked to PR #32404
parent c9d173a3
No related branches found
No related tags found
No related merge requests found
Showing
with 185 additions and 187 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment