[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kopete] plugins/otr: When updating OTR GUI icon properly set OTR instance tag
From:       Pali_Rohár <pali.rohar () gmail ! com>
Date:       2016-11-22 0:23:24
Message-ID: E1c8yrs-00064K-MT () code ! kde ! org
[Download RAW message or body]

Git commit 19957f9324a5ae45bcb1479f1bb017efa77d0aa7 by Pali Rohár.
Committed on 21/11/2016 at 23:31.
Pushed by pali into branch 'master'.

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

M  +4    -0    plugins/otr/otrlchatinterface.cpp

http://commits.kde.org/kopete/19957f9324a5ae45bcb1479f1bb017efa77d0aa7

diff --git a/plugins/otr/otrlchatinterface.cpp b/plugins/otr/otrlchatinterface.cpp
index cf5b492..6e3d417 100644
--- a/plugins/otr/otrlchatinterface.cpp
+++ b/plugins/otr/otrlchatinterface.cpp
@@ -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;


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic