'Extends the channel header by adding the livechat operator and the \'anonymous\' profile
:rtype : list(dict)'

@api.multi
def channel_info(self, extra_info=False):

    channel_infos = super(MailChannel, self).channel_info(extra_info)
    if self.env.context.get('im_livechat_operator_partner_id'):
        partner_name = self.env['res.partner'].browse(self.env.context.get('im_livechat_operator_partner_id')).name_get()[0]
        for channel_info in channel_infos:
            channel_info['operator_pid'] = partner_name
    channel_infos_dict = dict(((c['id'], c) for c in channel_infos))
    for channel in self:
        if channel.anonymous_name:
            channel_infos_dict[channel.id]['anonymous_name'] = channel.anonymous_name
        if (channel.channel_type == 'livechat'):
            last_msg = self.env['mail.message'].search([('channel_ids', 'in', [channel.id])], limit=1)
            if last_msg:
                channel_infos_dict[channel.id]['last_message_date'] = last_msg.date
    return channel_infos_dict.values()
