'Compute if the message is starred by the current user.'

@api.depends('starred_partner_ids')
def _get_starred(self):

    starred = self.sudo().filtered((lambda msg: (self.env.user.partner_id in msg.starred_partner_ids)))
    for message in self:
        message.starred = (message in starred)
