From 930d825ebce89dc4f07850df69c2379b3b9236a2 Mon Sep 17 00:00:00 2001 From: Kevin Froman Date: Tue, 5 Mar 2019 11:11:49 -0600 Subject: [PATCH] fix makefile and broken sentbox --- Makefile | 3 +++ onionr/static-data/default-plugins/pms/mailapi.py | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 4721e97c..f3ba33cb 100755 --- a/Makefile +++ b/Makefile @@ -1,3 +1,6 @@ +ONIONR_HOME ?= data +all:;: '$(ONIONR_HOME)' + PREFIX = /usr/local .DEFAULT_GOAL := setup diff --git a/onionr/static-data/default-plugins/pms/mailapi.py b/onionr/static-data/default-plugins/pms/mailapi.py index 766ae724..c8966112 100644 --- a/onionr/static-data/default-plugins/pms/mailapi.py +++ b/onionr/static-data/default-plugins/pms/mailapi.py @@ -51,11 +51,11 @@ def list_sentbox(): deleted = kv.get('deleted_mail') if deleted is None: deleted = [] - for x in range(len(sentbox_list_copy)): + for x in range(len(sentbox_list_copy) - 1): if sentbox_list_copy[x]['hash'] in deleted: x -= 1 sentbox_list.pop(x) else: - sentbox_list[x]['name'] = contactmanager.ContactManager(c, sentbox_list[x]['peer'], saveUser=False).get_info('name') + sentbox_list[x]['name'] = contactmanager.ContactManager(c, sentbox_list_copy[x]['peer'], saveUser=False).get_info('name') return json.dumps(sentbox_list) \ No newline at end of file