[OTR-dev] Conversion of unencrypted messages to system-messages

Ian Goldberg ian at cypherpunks.ca
Sun Feb 21 18:18:32 EST 2010

On Mon, Feb 22, 2010 at 12:08:30AM +0100, Michael Zanetti wrote:
> Hi,
> its me again. I decided to divide my requests into different mails to keep the 
> discussions sorted.
> The current implementation of kopete's otr plugin uses a message type called 
> "Internal" to display messages generated in display_otr_message(). Those 
> internal messages fit perfectly into Kopetes design, indicating encryption 
> state changes and other notifications of the lib to the user in a way that 
> they do not disturb the user but are definetly noticed. Such messages (also 
> used for other types of notifications like online status changes) do neither 
> produce system notification events nor get logged in chat history.
> The problem now is, that incoming unencrypted messages during an established 
> otr session are transformed into such messages because they are delivered 
> using display_otr_message(). This leaves kopete users often in the situation 
> that they do not notice such incoming messages or loose them in chat 
> histories.
> Could you think of a way to change that in future versions of libotr to keep 
> the actual message as a normal message but informing the user in some other 
> way of the unencrypted state of this message? Perhaps just leave it as a 
> normal message, but prepend the usual warning. Or maybe better, split the 
> warning message and the actual message into two, leaving the warning as an 
> internal message, but delivering the actual message as a normal one?
> This is one example bug-report I get for this issue:
> https://bugs.kde.org/show_bug.cgi?id=204502

The new API in CVS passes such unexpected unencrypted messages to the
application via the hangle_msg_event callback, with the OtrlMessageEvent
type OTRL_MSGEVENT_RCVDMSG_UNENCRYPTED.  Your application can then do
whatever it likes with the message.  One of the features of the new API
is that it removes all of the English and HTML from libotr so that it's
more useful in a variety of projects.

   - Ian

More information about the OTR-dev mailing list