From aec28278cfa5e86bead8a8775ada1ca26216f204 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 3 Jul 2020 22:33:51 +0100 Subject: [PATCH] Add new follows to the calendar by default --- utils.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/utils.py b/utils.py index 65f160dde..cf8ad07d5 100644 --- a/utils.py +++ b/utils.py @@ -16,6 +16,7 @@ import errno from urllib.request import urlopen from pprint import pprint from calendar import monthrange +from followingCalendar import addPersonToCalendar def getProtocolPrefixes() -> []: @@ -339,6 +340,12 @@ def followPerson(baseDir: str, nickname: str, domain: str, except Exception as e: print('WARN: Failed to write entry to follow file ' + filename + ' ' + str(e)) + + if followFile == 'following.txt': + # if following a person add them to the list of + # calendar follows + addPersonToCalendar(baseDir, nickname, domain, + followNickname, followDomain) if debug: print('DEBUG: creating new following file to follow ' + handleToFollow) with open(filename, "w") as followfile: