Add member's name and date to Spaceporter host bot message
This commit is contained in:
parent
10de956256
commit
f9df9cd4cd
|
@ -1796,9 +1796,10 @@ class HostingViewSet(Base):
|
||||||
|
|
||||||
try: # TODO: remove try / except
|
try: # TODO: remove try / except
|
||||||
# send a message to Spacebar
|
# 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,
|
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:
|
if hosting_user.member.discourse_username:
|
||||||
message += ' Tag @{} here to get their attention.'.format(
|
message += ' Tag @{} here to get their attention.'.format(
|
||||||
|
|
Loading…
Reference in New Issue
Block a user