|
@ -48,8 +48,7 @@ def _encrypted_message(from_address, to_address, shortmsg, longmsg): |
|
|
m.to = [pEp.Identity(to_address, to_address)] |
|
|
m.to = [pEp.Identity(to_address, to_address)] |
|
|
m.shortmsg = shortmsg |
|
|
m.shortmsg = shortmsg |
|
|
m.longmsg = longmsg |
|
|
m.longmsg = longmsg |
|
|
m.encrypt() |
|
|
return m.encrypt() |
|
|
return m |
|
|
|
|
|
|
|
|
|
|
|
def encrypted_message(from_address, to_address, shortmsg, longmsg): |
|
|
def encrypted_message(from_address, to_address, shortmsg, longmsg): |
|
|
return str(_encrypted_message(from_address, to_address, shortmsg, longmsg)) |
|
|
return str(_encrypted_message(from_address, to_address, shortmsg, longmsg)) |
|
@ -102,7 +101,7 @@ def printmsg(msg): |
|
|
pfx = " " |
|
|
pfx = " " |
|
|
printi("attachments : ", msg.attachments) |
|
|
printi("attachments : ", msg.attachments) |
|
|
|
|
|
|
|
|
def execute_order(order, handler, conn): |
|
|
def execute_order(order, handler): |
|
|
global handshakes_pending, handshakes_to_accept, handshakes_seen |
|
|
global handshakes_pending, handshakes_to_accept, handshakes_seen |
|
|
global handshakes_validated, msgs_folders |
|
|
global handshakes_validated, msgs_folders |
|
|
func, args, kwargs, timeoff = order[0:] + [None, [], {}, 0][len(order):] |
|
|
func, args, kwargs, timeoff = order[0:] + [None, [], {}, 0][len(order):] |
|
@ -163,7 +162,7 @@ def execute_order(order, handler, conn): |
|
|
handler.deliverHandshakeResult(partner, 0) |
|
|
handler.deliverHandshakeResult(partner, 0) |
|
|
printheader() |
|
|
printheader() |
|
|
|
|
|
|
|
|
conn.send(res) |
|
|
return res |
|
|
|
|
|
|
|
|
def pEp_instance_run(iname, conn, _msgs_folders, _handshakes_seen, _handshakes_validated): |
|
|
def pEp_instance_run(iname, conn, _msgs_folders, _handshakes_seen, _handshakes_validated): |
|
|
global pEp, handler, own_addresses, i_name, msgs_folders |
|
|
global pEp, handler, own_addresses, i_name, msgs_folders |
|
@ -207,7 +206,9 @@ def pEp_instance_run(iname, conn, _msgs_folders, _handshakes_seen, _handshakes_v |
|
|
if order is None: |
|
|
if order is None: |
|
|
break |
|
|
break |
|
|
|
|
|
|
|
|
execute_order(order, handler, conn) |
|
|
res = execute_order(order, handler) |
|
|
|
|
|
|
|
|
|
|
|
conn.send(res) |
|
|
|
|
|
|
|
|
msgs_folders = None |
|
|
msgs_folders = None |
|
|
|
|
|
|
|
|