support for html messages.

cusax-fix
Damian Minkov 19 years ago
parent 570c32adb8
commit 9cc947ea88

@ -14,6 +14,7 @@
import net.java.sip.communicator.service.protocol.yahooconstants.*;
import net.java.sip.communicator.util.*;
import ymsg.support.*;
import ymsg.network.*;
import ymsg.network.event.*;
@ -128,15 +129,19 @@ public Message createMessage(byte[] content, String contentType,
/**
* Create a Message instance for sending a simple text messages with
* default (text/plain) content type and encoding.
*
* default (html) content type and encoding.
* As no indications in the protocol is it html or not. No harm
* to set all messages html - doesn't affect the appearance of the gui
*
* @param messageText the string content of the message.
* @return Message the newly created message
*/
public Message createMessage(String messageText)
{
return new MessageYahooImpl(messageText, DEFAULT_MIME_TYPE
, DEFAULT_MIME_ENCODING, null);
return new MessageYahooImpl(
new MessageDecoder().decodeToHTML(messageText),
"html",
DEFAULT_MIME_ENCODING, null);
}
/**

@ -6,6 +6,7 @@ Bundle-Version: 0.0.1
Import-Package: org.osgi.framework,
javax.net.ssl,
javax.swing,
javax.swing.text,
javax.xml.parsers,
javax.naming,
javax.naming.directory,

Loading…
Cancel
Save