Before this commit:
Channel was not getting unpinned after being deleted
After this commit:
- Channel gets unpinned for all the channel members after being deleted
- If a user leaves channel/group then all of the messages of that channel/group
are removed from the user's history/starred/inbox channel.
Task-2814440
closesodoo/odoo#139972
X-original-commit: 4767d6001d15628768388bcac98c04ab185040c8
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>