How to get number of unreplied group channels by a user?

I have a requirement to show the number of unreplied chats in our chat list. This chat room can be read or not. The chat list is implemented long ago so I cannot just implement a new behavior to it since there is already a whole bunch of old data.

Basically I’m looking for a way to filter the group channels that has no message from a certain user. Is there any way to do it?