changeset 532:1fa173107fde

browser_side (wrapper otr.js): fixes the method to finish the conversation
author souliane <souliane@mailoo.org>
date Fri, 05 Sep 2014 12:26:33 +0200
parents 793f12d1f970
children 19fc2ebc02dd
files src/browser/sat_browser/otrjs_wrapper.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/browser/sat_browser/otrjs_wrapper.py	Fri Sep 05 12:08:55 2014 +0200
+++ b/src/browser/sat_browser/otrjs_wrapper.py	Fri Sep 05 12:26:33 2014 +0200
@@ -132,7 +132,8 @@
 
         def finish(self):
             """Finish the session - avoid to send any message and the user has to manually disconnect"""
-            self.otr.handleTLVs('\x00\x00\x01\x00\x00')
+            # it means TLV of type 1 (two first bytes), message length 0 (2 last bytes)
+            self.otr.handleTLVs('\x00\x01\x00\x00')
 
         def receiveMessage(self, msg):
             """Received a message, ask otr.js to (try to) decrypt it"""