Split ChatMessages collection by groups