Get post id

main
Bob Mottram 2022-02-21 19:13:19 +00:00
parent b1615bb1e8
commit 60ded3b832
1 changed files with 3 additions and 4 deletions

View File

@ -240,6 +240,7 @@ def get_todays_events(base_dir: str, nickname: str, domain: str,
# link to the id so that the event can be # link to the id so that the event can be
# easily deleted # easily deleted
tag['post_id'] = post_id.split('#statuses#')[1] tag['post_id'] = post_id.split('#statuses#')[1]
tag['id'] = post_id
tag['sender'] = post_id.split('#statuses#')[0] tag['sender'] = post_id.split('#statuses#')[0]
tag['sender'] = tag['sender'].replace('#', '/') tag['sender'] = tag['sender'].replace('#', '/')
tag['public'] = public_event tag['public'] = public_event
@ -292,10 +293,8 @@ def _icalendar_day(base_dir: str, nickname: str, domain: str,
for evnt in event_post: for evnt in event_post:
if evnt['type'] == 'Event': if evnt['type'] == 'Event':
if evnt.get('post_id'): if evnt.get('id'):
post_id = \ post_id = evnt['id']
http_prefix + '://' + domain + \
'/users/' + nickname + '/statuses/' + evnt['post_id']
if evnt.get('startTime'): if evnt.get('startTime'):
event_start = \ event_start = \
datetime.strptime(evnt['startTime'], datetime.strptime(evnt['startTime'],