Sending xHTML

Hello im trying to modify Registration Plugin to send xHTML in welcome text, not only plain text. Anyone got idea how?

Part of RegistrationPlugin.java:

public String getWelcomeMessage() {

return JiveGlobals.getProperty(WELCOME_MSG, “Welcome to Wildfire!”);

}

private void sendWelcomeMessage(User user) {

router.route(createServerMessage(user.getUsername() + “@” + serverName, “Welcome”,

getWelcomeMessage()));

}

private Message createServerMessage(String to, String subject, String body) {

Message message = new Message();

message.setTo(to);

message.setFrom(serverAddress);

if (subject != null) {

message.setSubject(subject);

}

message.setBody(body);

return message;

}


import org.xmpp.packet -> http://www.jivesoftware.org/builds/wildfire/docs/latest/documentation/javadoc/or g/xmpp/packet/package-tree.html

Hi Michael,

In the createServerMessage method you’'ll want to call addExtension() on the message packet instance. You can read about how to properly format the extension in JEP-0071.

Hope that helps,

Ryan

Are its possible to add javascript to this xhtml?

No. Check the link to the JEP above to see what is allowed.