Before this commit, controller did
1. search all channels with an alias
2. search on the messages on mail.channel
3. map the number of messages with the channels
The issue was that the list of messages in step 2 includes more
channels than the ones found in step 1.
The list of messages may be very big and some groups may be retrieved
while not used in the small list of channels with an alias.
This commit should improve performances while accessing the /groups
page.
closesodoo/odoo#52593
X-original-commit: 60e806f4ea8ce75390eb59620ec61a39b4d3ccd2
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>