'Temporary workaround to avoid spam. If someone replies on a channel
through the \'Presentation Published\' email, it should be considered as a
note as we don\'t want all channel followers to be notified of this answer.'

@api.multi
@api.returns('self', (lambda value: value.id))
def message_post(self, parent_id=False, subtype=None, **kwargs):

    self.ensure_one()
    if parent_id:
        parent_message = self.env['mail.message'].sudo().browse(parent_id)
        if (parent_message.subtype_id and (parent_message.subtype_id == self.env.ref('website_slides.mt_channel_slide_published'))):
            if kwargs.get('subtype_id'):
                kwargs['subtype_id'] = False
            subtype = 'mail.mt_note'
    return super(Channel, self).message_post(parent_id=parent_id, subtype=subtype, **kwargs)
