diff --git a/happening.py b/happening.py index 3c78521be..e13c8270b 100644 --- a/happening.py +++ b/happening.py @@ -233,6 +233,8 @@ def getTodaysEvents(baseDir: str, nickname: str, domain: str, # link to the id so that the event can be # easily deleted tag['postId'] = postId.split('#statuses#')[1] + tag['sender'] = postId.split('#statuses#')[0] + tag['sender'] = tag['sender'].replace('#', '/') postEvent.append(tag) else: # tag is a place diff --git a/webapp_calendar.py b/webapp_calendar.py index a5bc1611d..cf6c72521 100644 --- a/webapp_calendar.py +++ b/webapp_calendar.py @@ -135,6 +135,7 @@ def _htmlCalendarDay(personCache: {}, cssCache: {}, translate: {}, eventDescription = None eventPlace = None postId = None + senderName = '' # get the time place and description for ev in eventPost: if ev['type'] == 'Event': @@ -145,21 +146,22 @@ def _htmlCalendarDay(personCache: {}, cssCache: {}, translate: {}, datetime.strptime(ev['startTime'], "%Y-%m-%dT%H:%M:%S%z") eventTime = eventDate.strftime("%H:%M").strip() - if ev.get('name'): + if ev.get('sender'): # get display name from sending actor - senderName = '' - # if ev.get('actor'): - # actor = ev['actor'] - # senderName = \ - # '' + \ - # getDisplayName(baseDir, actor, - # personCache) + \ - # ': ' + if ev.get('sender'): + senderActor = ev['sender'] + senderName = \ + '' + \ + getDisplayName(baseDir, senderActor, + personCache) + ': ' + if ev.get('name'): eventDescription = senderName + ev['name'].strip() elif ev['type'] == 'Place': if ev.get('name'): eventPlace = ev['name'] + if senderName and eventDescription: + eventDescription = senderName + eventDescription deleteButtonStr = '' if postId: deleteButtonStr = \