Link to event parameters

main
Bob Mottram 2020-08-20 18:08:25 +01:00
parent f263cef884
commit fa0434ca9c
2 changed files with 6 additions and 0 deletions

View File

@ -49,6 +49,8 @@ def saveEventPost(baseDir: str, handle: str, postId: str,
If an event has extra fields, as per Mobilizon,
Then it is saved as a separate entity and added to the
events timeline
See https://framagit.org/framasoft/mobilizon/-/blob/
master/lib/federation/activity_stream/converter/event.ex
"""
calendarPath = baseDir + '/accounts/' + handle + '/calendar'
if not os.path.isdir(calendarPath):

View File

@ -772,6 +772,8 @@ def receiveUndo(session, baseDir: str, httpPrefix: str,
def isEventPost(messageJson: {}) -> bool:
"""Is the given post a mobilizon-type event activity?
See https://framagit.org/framasoft/mobilizon/-/blob/
master/lib/federation/activity_stream/converter/event.ex
"""
if not messageJson.get('id'):
return False
@ -804,6 +806,8 @@ def receiveEventPost(recentPostsCache: {}, session, baseDir: str,
personCache: {}, messageJson: {}, federationList: [],
nickname: str, debug: bool) -> bool:
"""Receive a mobilizon-type event activity
See https://framagit.org/framasoft/mobilizon/-/blob/
master/lib/federation/activity_stream/converter/event.ex
"""
if not isEventPost(messageJson):
return