about summary refs log tree commit diff stats
path: root/src/otr/otrlibv3.c
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2014-05-07 20:41:05 +0100
committerJames Booth <boothj5@gmail.com>2014-05-07 20:41:05 +0100
commit1e4fc2ce793a418317b8adc929fc4a349d79fb15 (patch)
tree0ef2552285c2e7d260d0bb8b17fadde90f2a0b17 /src/otr/otrlibv3.c
parent9fd9871ee908088db4209d6ecc3b4a90d8cfbf8c (diff)
downloadprofani-tty-1e4fc2ce793a418317b8adc929fc4a349d79fb15.tar.gz
Added UI messages for smp question/answer result
Diffstat (limited to 'src/otr/otrlibv3.c')
-rw-r--r--src/otr/otrlibv3.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/otr/otrlibv3.c b/src/otr/otrlibv3.c
index 92ca3602..619e35cd 100644
--- a/src/otr/otrlibv3.c
+++ b/src/otr/otrlibv3.c
@@ -162,11 +162,15 @@ otrlib_handle_tlvs(OtrlUserState user_state, OtrlMessageAppOps *ops, ConnContext
                 if ((context->active_fingerprint->trust != NULL) && (context->active_fingerprint->trust[0] != '\0')) {
                     ui_smp_successful(context->username);
                     ui_trust(context->username);
-                    otr_trust(context->username);
                 } else {
                     ui_smp_unsuccessful_sender(context->username);
                     ui_untrust(context->username);
-                    otr_untrust(context->username);
+                }
+            } else {
+                if (context->smstate->sm_prog_state == OTRL_SMP_PROG_SUCCEEDED) {
+                    ui_smp_answer_success(context->username);
+                } else {
+                    ui_smp_answer_failure(context->username);
                 }
             }
         }
@@ -180,11 +184,9 @@ otrlib_handle_tlvs(OtrlUserState user_state, OtrlMessageAppOps *ops, ConnContext
             if ((context->active_fingerprint->trust != NULL) && (context->active_fingerprint->trust[0] != '\0')) {
                 ui_smp_successful(context->username);
                 ui_trust(context->username);
-                otr_trust(context->username);
             } else {
                 ui_smp_unsuccessful_receiver(context->username);
                 ui_untrust(context->username);
-                otr_untrust(context->username);
             }
         }
     }