Sending color message

How can I send a colored message (e.g: using xhtml in the message body)?

The standard method for creating “rich text” in a message is to use an sub-element rather than use the message :

Hi, this is bold and this is <font color=’‘red’’>red

Smack doesn’‘t have rich text support yet but we’'d love to have help adding it.

Urm… we might be interested in helping with Smack. What’'s the next step?

Dave,

Are you interested in helping out on the xhmtml issue, or other things? There’‘s not a formal process in place, but I’'d imagine it would be something like:

  • Discuss design of changes in the forums

  • Submit patches via the forums (people can be given attachment permissions for this purpose)

  • Dedicated developers will get CVS access.

Regards,

Matt

I’‘m pretty familiar with Jabber internals and have been using the Net::Jabber Perl lib quite a bit. I think Smack is off to a great start and would like to contribute. It’‘ll be a couple weeks before I can devote a ton of time, but something like account managment and vcards would be good additions. If I come up with something spiffy, I’'ll post it here then

I’‘ve look at the javadoc, and didn’‘t find anywhere I could craft a packet my self (the Packet class is great, but I can’'t place a tag in it).

Any idea?

To keep the library small and focused, we don’'t have a DOM tree which would make the library easier to extend from the ‘‘outside’’. There are two ways of adding an XHTML element:

  1. go into the Message class and add a field and set/get methods for XHTML content (use body as a template). Then change the toXML to insert the XHTML element if present.

  2. extend the Message class, add a field and set/get methods for XHTML content (use body as a template). Then override the toXML method to insert the XHTML element if present.

I think option #1 would be best if you plan on submitting your edits as a patch to be included in the main library source. Option #2 may be easier to maintain if you want to keep your source changes separate from our source.

-iain