From 1180e22738ca6ebe6f13c0d4317cd6c6b2d08db1 Mon Sep 17 00:00:00 2001 From: Volker Birk Date: Wed, 24 Oct 2018 16:39:55 +0200 Subject: [PATCH] small sync test --- test/sync_handshake.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 test/sync_handshake.py diff --git a/test/sync_handshake.py b/test/sync_handshake.py new file mode 100644 index 0000000..fb5ab4e --- /dev/null +++ b/test/sync_handshake.py @@ -0,0 +1,25 @@ +# vim: set fileencoding=utf-8 : + +# Sync test 2.0 +# Copyleft 2018, Volker Birk + +# this file is under GNU General Public License 3.0 + + +import pEp + + +def messageToSend(msg): + # this is assuming that msg is unencrypted; only true for beacons + print("\n" + msg.attachments[0].decode()) + +pEp.messageToSend = messageToSend + + +class UserInterface(pEp.UserInterface): + def notifyHandshake(self, me, partner, signal): + print("signal " + str(signal) + " for identities " + str(me) + " " + str(partner)) + + +ui = UserInterface() +