Unable to recognise different types of messages

hi

i’‘m trying to develop a chat client.i’'m facing the following problem in processing the packets i recieve.

i’'ve imported the import org.jivesoftware.smack.packet.*;

in my program even then it doesnt recognise the Messgae type.

i’'m getting the following exception

.\main\ChatClient.java:97: cannot resolve symbol

symbol : variable CHAT

location: class org.jivesoftware.smack.packet.Message

if( type == Message.CHAT || type == Message.NORMAL)

.\main\ChatClient.java:97: cannot resolve symbol

symbol : variable NORMAL

location: class org.jivesoftware.smack.packet.Message

if( type == Message.CHAT || type == Message.NORMAL)

i’'m using the following code

public void processPacket(Packet packet){

Message msg = (Message)packet;

Message.Type type = msg.getType();

if( type == Message.CHAT || type == Message.NORMAL)

// some code after recognising the message type

}

how do I distingush between different message types.

Sara

Sara,

The code you want to use is:

Message.Type.Chat or Message.Type.Normal, and so on.

Regards,

Matt

Thanks Matt.

Sara