From c593aca45d0f58a0617cfcbede344761054be461 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 18 Aug 2019 21:54:33 +0100 Subject: [PATCH] Detect post recipients --- posts.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/posts.py b/posts.py index 8307275c..e6193d34 100644 --- a/posts.py +++ b/posts.py @@ -1338,13 +1338,23 @@ def sendToNamedAddresses(session,baseDir: str, \ for rType in recipientType: if not recipientsObject.get(rType): continue - for address in recipientsObject[rType]: + if isinstance(recipientsObject[rType], list): + for address in recipientsObject[rType]: + if address.endswith('#Public'): + continue + if address.endswith('/followers'): + continue + recipients.append(address) + elif isinstance(recipientsObject[rType], str): + address=recipientsObject[rType] if address.endswith('#Public'): continue if address.endswith('/followers'): continue recipients.append(address) if not recipients: + if debug: + print('DEBUG: no individual recipients') return if debug: print('DEBUG: Sending individually addressed posts: '+str(recipients))