From f9df9cd4cdd424585690cc8a5bb0f1ded2b9c061 Mon Sep 17 00:00:00 2001 From: Tanner Collin Date: Sun, 30 Jul 2023 01:06:40 +0000 Subject: [PATCH] Add member's name and date to Spaceporter host bot message --- apiserver/apiserver/api/views.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apiserver/apiserver/api/views.py b/apiserver/apiserver/api/views.py index c855f38..824c1ec 100644 --- a/apiserver/apiserver/api/views.py +++ b/apiserver/apiserver/api/views.py @@ -1796,9 +1796,10 @@ class HostingViewSet(Base): try: # TODO: remove try / except # send a message to Spacebar - message = 'A member just offered to host for {} hours from now until {}!'.format( + message = '{} just offered to host for {} hours from now until {}!'.format( + hosting_user.member.preferred_name, hours, - h.finished_at.astimezone(utils.TIMEZONE_CALGARY).strftime('%-I:%M %p'), + h.finished_at.astimezone(utils.TIMEZONE_CALGARY).strftime('%-I:%M %p, %b %d'), ) if hosting_user.member.discourse_username: message += ' Tag @{} here to get their attention.'.format(