From e007168cd6c3d39e67a869a438ac1fb4db2fc9ee Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 11 Jul 2020 23:36:52 +0100 Subject: [PATCH] Check for type field --- inbox.py | 2 ++ posts.py | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/inbox.py b/inbox.py index 5b96a53f..c8545e49 100644 --- a/inbox.py +++ b/inbox.py @@ -1920,6 +1920,8 @@ def inboxUpdateCalendar(baseDir: str, handle: str, postJsonObject: {}) -> None: actorNickname, actorDomain): return for tagDict in postJsonObject['object']['tag']: + if not tagDict.get('type'): + continue if tagDict['type'] != 'Event': continue if not tagDict.get('startTime'): diff --git a/posts.py b/posts.py index 8dd55080..dfcfc100 100644 --- a/posts.py +++ b/posts.py @@ -1918,8 +1918,7 @@ def addToField(activityType: str, postJsonObject: {}, def sendToNamedAddresses(session, baseDir: str, - nickname: str, - domain: str, + nickname: str, domain: str, onionDomain: str, i2pDomain: str, port: int, httpPrefix: str, federationList: [], sendThreads: [], postLog: [],