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