Commit 19957f93 authored by Pali Rohár's avatar Pali Rohár
Browse files

When updating OTR GUI icon properly set OTR instance tag

Without configured instance tag libotr library does not encrypt sent
messages and moreover it even does not report any error that message was
not encrypted.

This should fix a bug when OTR "encrypted" icon is shown in GUI and libotr
itself does not want to encrypt messages. It happened when Kopete window
with active OTR session was closed and after that again opened.

BUG: 362535
FIXED-IN: 16.12
parent 552c1ebb
......@@ -744,6 +744,10 @@ int OtrlChatInterface::privState( Kopete::ChatSession *session ){
ConnContext *context = otrl_context_find(userstate, session->members().first()->contactId().toLocal8Bit(), session->account()->accountId().toLocal8Bit(), session->account()->protocol()->displayName().toLocal8Bit(), instance, 0, NULL, NULL, NULL);
if( context ){
if( instance == OTRL_INSTAG_BEST && context->their_instance ){
kDebug(14318) << "Updating otr-instag to" << context->their_instance << "for session" << session;
session->setProperty("otr-instag", QString::number(context->their_instance));
}
switch( context->msgstate ){
case OTRL_MSGSTATE_PLAINTEXT:
return 0;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment