Managing messaging in groups in Openfire

I am developing an instant chat messenger. I have used openfire as my server(on windows), and smack API’s at client(android) end.

I have thought of an approach but not able to figure out how to move ahead.

My app. will have an open group, many clients will be part of it, what I want is client should not receive messages which it doesn’t like. Lets say we have a group where A posts some message on group, now client B is also on this group but has created filters for words like(“hi”, “hello” ,etc. ), These filter words are saved on server for each person,

If message sent contains “hi”, server should not send message to B. What I mean to say is server should compute individually for each user, and then send message to that user.

One possible way I figured out is implement filter at client end, but for some reasons I can not use that approach.

Are there any functions or external plugins that can help me perform computation before sending messages to individual clients in group chat.

FYI, I don’t have prior knowledge of openfire(hardly used it for 7 days), please help me decide how should I move ahead?