Concert with all the information that our friend @gduran offers us. Medel attacked Messi and what he did was face him and defend his face, they should not have expelled Messi from the game. The referee should have reviewed the VAR, and the action is not clear.
However, there are always things like this, there are blows, misunderstandings and mistakes in everything.