Hiding a message in group channel, replace original datasource

[Problem/Question]
So I’m trying to hide certain messages that contain certain metadata properties or by text from client side only.

At first I was attempting to use custom cells to hide the message.

But seems by doing this it also breaks the chat cause then the Photo and Time when the message was sent is also deleted and is not shown or moved to the previous message…
or
if I only delete the text it is shown but it doesn’t keep the chat normal layout

So then I was trying to achieve this by overriding a method something like this

	public override func baseChannelViewModel(_ viewModel: SBUBaseChannelViewModel, didChangeMessageList messages: [BaseMessage], needsToReload: Bool, initialLoad: Bool) {

		let filteredMessages = messages.filter { !($0.isHiddenMessage) }

		viewModel.updateMessagesInList(messages: filteredMessages, needReload: false)
		super.baseChannelViewModel(viewModel, didChangeMessageList: messages, needsToReload: needsToReload, initialLoad: initialLoad)
	}

the problem here is that I get stuck into a endless loop, after the updateMessagesInList it will automatically runs a sorting, and even if I remove the super call in the end of the method or even if i put needsToReload = false

I also tried to use viewModel.deleteMessage(message:) but didn’t seem to do anything and I dont actually want to delete it from server… just hide it.

So any ideas on how to hide specific messages?