-
- Downloads
[IMP] mail, hr_holidays: improve channel_info
`channel_info` can be called on multiple channels especially during the init_messaging. The current implementation will perform read and other queries in the loop. This commits aims to refactor `channel_info` in order to read all informations in database out of the loop. Computation of members informations is now the same as for `direct_partner` As a side effect direct partner will have an email adress and members will have im_status and out_of_office message if the partner is in a channel of type chat. It would be easier to compute im_status in all case but this could create performances issues when calling channel info on channel with hundreds of users. channel_fetch_preview will make a query in database in any case but seems to work ok in api multi. We can put it out of the loop. 44ac7903 fix shouldn't be broken by this refactoring since we are no longer using the many2many to find direct_partners.
Loading
Please register or sign in to comment