« Happy Birthday Jessie! | Main| Two reasons to upgrade to Notes 8.5.1 »

Rich Text no longer woring in Sametime Bots?

Category
I saw a few posts recently to forums and blogs of people saying that Sametime 8.0.2 had broken their Sametime Rich Text bots.  This weekend I came across something similar with the Sametime 8.5 client Beta (Sametime 8.5 beta is on Lotus Greenhouse, so I'm not breaking NDA talking about it before anyone asks)

I decided to start of by loading the stockbot sample code I posted a while back to the OpenNTF.org website.

Loaded up the code in eclipse and started it up.  Started a conversation with it using Sametime 7.5 all worked ok, 7.5.1 still good, 8.0 still good, 8.0.1 still good, 8.0.2 no picture, 8.5 no picture.  Hhhmm, so something changed in 8.0.2 (another of those undocumented changes no doubt)

Investigating further I discovered that 8.0.2 and 8.5 have become much more fussy about the HTML they render, even down case in some cases.  So regardless of the statements some have made that bots can not longer send Rich Text via bots, this is wrong, they can, you just have to make sure the format is handled by the Sametime client.

So for example, previously I could send

"<span style=\"font-size:8pt;font-family:Tahoma;color:#000000;font-style:normal;\" class=\"left\">"
+ "Stock Price for <b>"
+ messageText
+ "</b><BR><IMG SRC='http://stockcharts.com/c-sc/sc?s="
+ messageText
+ "&p=D&b=5&g=0&i=t88252470817&r=5447' width='460px' height='284px'></span>");

and it rendered fine, now I have to send
"<span style=\"font-size:8pt;font-family:Tahoma;color:#000000;font-style:normal;\" class=\"left\">"
+ "Stock Price for <b>"
+ messageText
+ "</b><BR><IMG src='http://stockcharts.com/c-sc/sc?s="
+ messageText
+ "&p=D&b=5&g=0&i=t88252470817&r=5447' width='460px' height='284px'></span>");

Notice how SRC is now lowercase.
So how can you figure out the format of the text that Sametime?  Well the easiest way would to be to look at the documentation out of IBM, but sadly that doesn't exist, so I find the best way is to send text from a Sametime client to the bot, and have the bot output to the console the incoming text, which will show the HTML of the incoming message, and using that it is pretty easy to figure out the HTML format Sametime expects.

Comments

Gravatar Image1 - That fixed everything for me regarding the <A>. The other thing to note is the Tag name has to be in capitals. (<A> <IMG>).

I've found that sending a rendered image in the tag does not work. Emoticon

For example:

<IMG src='data:image/png,%89PNG%0D%0A%1A%0A%00.....'/>

ST appears to add a title property if you don't set one.

I'll chat to someone on the ST team tomorrow and point them to the blog. Thanks.

Gravatar Image2 - Apologies in getting back to you. I have created SPR SODY7XRLX7 for this issue.

Gravatar Image3 - Thanks Simon, I had also submitted it as an issue in the Sametime 8.5 beta forum.

Post A Comment

:-D:-o:-p:-x:-(:-):-\:angry::cool::cry::emb::grin::huh::laugh::rolleyes:;-)