mirror of https://gitlab.com/bashrc2/epicyon
No return object
parent
3bd8f96994
commit
e90f1d4f2c
31
posts.py
31
posts.py
|
@ -619,13 +619,11 @@ def appendEventFields(newPost: {},
|
|||
eventDateStr: str,
|
||||
endDateStr: str,
|
||||
location: str,
|
||||
maximumAttendeeCapacity: int) -> {}:
|
||||
maximumAttendeeCapacity: int) -> None:
|
||||
"""Appends Mobilizon-type event fields to a post
|
||||
"""
|
||||
return newPost
|
||||
|
||||
if not eventUUID:
|
||||
return newPost
|
||||
return
|
||||
|
||||
# add attributes for Mobilizon-type events
|
||||
newPost['uuid'] = eventUUID
|
||||
|
@ -646,7 +644,6 @@ def appendEventFields(newPost: {},
|
|||
newPost['location'] = location
|
||||
if maximumAttendeeCapacity:
|
||||
newPost['maximumAttendeeCapacity'] = maximumAttendeeCapacity
|
||||
return newPost
|
||||
|
||||
|
||||
def createPostBase(baseDir: str, nickname: str, domain: str, port: int,
|
||||
|
@ -894,12 +891,12 @@ def createPostBase(baseDir: str, nickname: str, domain: str, port: int,
|
|||
attachMedia(baseDir, httpPrefix, domain, port,
|
||||
newPost['object'], attachImageFilename,
|
||||
mediaType, imageDescription, useBlurhash)
|
||||
#newPost = appendEventFields(newPost['object'], eventUUID, eventStatus,
|
||||
# anonymousParticipationEnabled,
|
||||
# repliesModerationOption,
|
||||
# category, joinMode,
|
||||
# eventDateStr, endDateStr,
|
||||
# location, maximumAttendeeCapacity)
|
||||
appendEventFields(newPost['object'], eventUUID, eventStatus,
|
||||
anonymousParticipationEnabled,
|
||||
repliesModerationOption,
|
||||
category, joinMode,
|
||||
eventDateStr, endDateStr,
|
||||
location, maximumAttendeeCapacity)
|
||||
else:
|
||||
idStr = \
|
||||
httpPrefix + '://' + domain + '/users/' + nickname + \
|
||||
|
@ -941,12 +938,12 @@ def createPostBase(baseDir: str, nickname: str, domain: str, port: int,
|
|||
attachMedia(baseDir, httpPrefix, domain, port,
|
||||
newPost, attachImageFilename,
|
||||
mediaType, imageDescription, useBlurhash)
|
||||
#newPost = appendEventFields(newPost, eventUUID, eventStatus,
|
||||
# anonymousParticipationEnabled,
|
||||
# repliesModerationOption,
|
||||
# category, joinMode,
|
||||
# eventDateStr, endDateStr,
|
||||
# location, maximumAttendeeCapacity)
|
||||
appendEventFields(newPost, eventUUID, eventStatus,
|
||||
anonymousParticipationEnabled,
|
||||
repliesModerationOption,
|
||||
category, joinMode,
|
||||
eventDateStr, endDateStr,
|
||||
location, maximumAttendeeCapacity)
|
||||
if ccUrl:
|
||||
if len(ccUrl) > 0:
|
||||
newPost['cc'] = [ccUrl]
|
||||
|
|
Loading…
Reference in New Issue