Get start time of event

main2
Bob Mottram 2019-10-11 17:16:56 +01:00
parent 93105821a0
commit da7d9b4ea4
2 changed files with 9 additions and 9 deletions

View File

@ -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= \

View File

@ -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,