Michael Zanetti wrote:
> Thats not right.:
> otrlChatInterface->encryptMessage(  ... ) does not send the Message out. It 
>   
I don't think that's your problem... my logic is correct but my code
reference is wrong.

Without taking the time to track down the actual lines you need to
change...

In short what you are doing now is this sequence:

    - Message is entered
    - Encrypt message
    - Set message contents to encrypted contents (Kopete::Message::setBody)
    - Continue chain processing (other plugins)
    - Send data over wire

What you need to be doing is this sequence:

    - Message is entered
    - Continue chain processing (other plugins)
    - Encrypt message
    - Send encrypted message over wire

That is you should never be encrypting the message and then calling
Kopete::Message::setBody with that, unless it is right before the wire
transfer.

If you encrypt it before the wire transfer then that will break all the
other plugin's processing. You should be encrypting only just before the
message is actually sent over the wire, wherever that is in your code.

The only reason the GPG plugin calls setBody is because it is a plugin
and thus has no other option - the only reason the history plugin works
with this is because it is processing the message before it. But this
will never work in your case because you are the protool - you are
always going to have first crack at the message.

> The only way I see to log the messages is to influence the order the plugins 
> are called but I havent found any way to do this so far.just passes the 
> messagetext to the libotr and returns the encrypted text. 
This has something to do with Kopete::MessageHandlerChain but I can't
remember it's been too long :)

_______________________________________________
kopete-devel mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/kopete-devel

Reply via email to