Wildfire to ignore all message send from some certain users

Hi All,

I wonder if it is possible to configure Wildfire to ignore messages sent from some certain users, it means those users can only logon and receive messages sent to them but they can not send any message. If it is possible, please let me know how?

Many thanks,

Trung.

Hi Trung,

Such feature is not available out of the box. However, you can add the feature yourself. It can be done with a packet interceptor plugin, and you can develop it yourself. The plugin development documentation can be found here. Your code could be something like the following:

class JID_Filter_Interceptor implements PacketInterceptor {
    public void interceptPacket(Packet packet, Session session, boolean incoming, boolean processed) throws PacketRejectedException {
if ((packet instanceof Message) && incoming && !processed) {
            Message presencePacket = (Message) packet;
            JID fromJID = presencePacket.getFrom();             if (/* test for blocked fromJID == true */) {
                throw new PacketRejectedException("Not allowed");
            }
        }
    }
}

Hope that helps.

Message was edited by: aznidin

Aznidin,

that is all i need

Once again thanks.

Trung