commit f682744a9cb9c5443eabecc0ed1df2ae224234d6
parent bf634ca22fb5cdc964af23b14323acd8e4bcff0c
Author: parazyd <parazyd@dyne.org>
Date: Wed, 23 Jan 2019 14:33:07 +0100
Don't double the messages if we're sending to ourself.
Diffstat:
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/utils.py b/utils.py
@@ -361,6 +361,9 @@ def send_message(id_to, msg, id_us):
with open(our_msgpath, 'w') as ourmsgs:
json.dump(ourdata, ourmsgs)
+ if our_msgpath == their_msgpath:
+ return
+
if isfile(their_msgpath):
with open(their_msgpath) as theirmsgs:
theirdata = json.load(theirmsgs)