Search in sources :

Example 1 with MsnControlMessage

use of net.sf.jml.message.MsnControlMessage in project Openfire by igniterealtime.

the class MSNSession method sendChatState.

/**
     * @see net.sf.kraken.session.TransportSession#sendChatState(org.xmpp.packet.JID,net.sf.kraken.type.ChatStateType)
     */
@Override
public void sendChatState(JID jid, ChatStateType chatState) {
    if (chatState.equals(ChatStateType.composing)) {
        Email jidEmail = Email.parseStr(getTransport().convertJIDToID(jid));
        MsnControlMessage mcm = new MsnControlMessage();
        mcm.setTypingUser(msnMessenger.getOwner().getEmail().getEmailAddress());
        for (MsnSwitchboard sb : msnMessenger.getActiveSwitchboards()) {
            if (sb.containContact(jidEmail)) {
                sb.sendMessage(mcm, true);
            }
        }
    }
}
Also used : Email(net.sf.jml.Email) MsnControlMessage(net.sf.jml.message.MsnControlMessage) MsnSwitchboard(net.sf.jml.MsnSwitchboard)

Aggregations

Email (net.sf.jml.Email)1 MsnSwitchboard (net.sf.jml.MsnSwitchboard)1 MsnControlMessage (net.sf.jml.message.MsnControlMessage)1