From da7d9b4ea407eddc1faec31315967c0c6ad112a3 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 11 Oct 2019 17:16:56 +0100 Subject: [PATCH] Get start time of event --- inbox.py | 2 +- posts.py | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/inbox.py b/inbox.py index c7d50c17f..82481e356 100644 --- a/inbox.py +++ b/inbox.py @@ -1375,7 +1375,7 @@ def inboxUpdateCalendar(baseDir: str,handle: str,postJsonObject: {}) -> None: for tagDict in postJsonObject['object']['tag']: if tagDict['type']!='Event': continue - if not tagDict['type'].get('startTime'): + if not tagDict.get('startTime'): continue # get the year and month from the event eventTime= \ diff --git a/posts.py b/posts.py index 6975fa386..1fb20485a 100644 --- a/posts.py +++ b/posts.py @@ -717,7 +717,7 @@ def outboxMessageCreateWrap(httpPrefix: str, \ return newPost def postIsAddressedToFollowers(baseDir: str, - nickname: str, domain: str, port: int,httpPrefix: str, + nickname: str,domain: str,port: int,httpPrefix: str, postJsonObject: {}) -> bool: """Returns true if the given post is addressed to followers of the nickname """ @@ -816,10 +816,10 @@ def createUnlistedPost(baseDir: str, if port!=80 and port!=443: if ':' not in domain: domainFull=domain+':'+str(port) - return createPostBase(baseDir,nickname, domain, port, \ + return createPostBase(baseDir,nickname,domain,port, \ httpPrefix+'://'+domainFull+'/users/'+nickname+'/followers', \ 'https://www.w3.org/ns/activitystreams#Public', \ - httpPrefix, content, followersOnly, saveToFile, \ + httpPrefix,content,followersOnly,saveToFile, \ clientToServer, \ attachImageFilename,mediaType, \ imageDescription,useBlurhash, \ @@ -841,10 +841,10 @@ def createFollowersOnlyPost(baseDir: str, if port!=80 and port!=443: if ':' not in domain: domainFull=domain+':'+str(port) - return createPostBase(baseDir,nickname, domain, port, \ + return createPostBase(baseDir,nickname,domain,port, \ httpPrefix+'://'+domainFull+'/users/'+nickname+'/followers', \ None, - httpPrefix, content, followersOnly, saveToFile, \ + httpPrefix,content,followersOnly,saveToFile, \ clientToServer, \ attachImageFilename,mediaType, \ imageDescription,useBlurhash, \ @@ -899,13 +899,13 @@ def createDirectMessagePost(baseDir: str, return None postTo=None postCc=None - return createPostBase(baseDir,nickname, domain, port, \ + return createPostBase(baseDir,nickname,domain,port, \ postTo,postCc, \ - httpPrefix, content, followersOnly, saveToFile, \ + httpPrefix,content,followersOnly,saveToFile, \ clientToServer, \ attachImageFilename,mediaType, \ imageDescription,useBlurhash, \ - False,inReplyTo, inReplyToAtomUri, subject, \ + False,inReplyTo,inReplyToAtomUri,subject, \ eventDate,eventTime,location) def createReportPost(baseDir: str,