Skip to content

Commit

Permalink
Add name linking to vivek's slack notification and welcomebot (gitcoi…
Browse files Browse the repository at this point in the history
…nco#1452)

* Add name linking to vivek's slack notification and welcomebot

* Fix linking - link_names deprecated

* Add @SaptakS, @thelostone-mc, Scott, and Ben to the staff list in the welcomebot message
  • Loading branch information
mbeacom authored Jun 13, 2018
1 parent f2966b5 commit 672aa1f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion app/dashboard/notifications.py
Original file line number Diff line number Diff line change
Expand Up @@ -758,7 +758,7 @@ def maybe_notify_bounty_user_escalated_to_slack(bounty, username, last_heard_fro
if not bounty.is_notification_eligible(var_to_check=settings.SLACK_TOKEN):
return False

msg = f"@vivek, {bounty.github_url} is being escalated to you, due to inactivity for {last_heard_from_user_days} days from @{username} on the github thread."
msg = f"<@U88M8173P>, {bounty.github_url} is being escalated to you, due to inactivity for {last_heard_from_user_days} days from <@{username}> on the github thread."

try:
sc = SlackClient(settings.SLACK_TOKEN)
Expand Down
9 changes: 3 additions & 6 deletions ops/lambdas/welcomebot/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def get_default_message():
We have more details in our onboarding guide at https://gitcoin.co/docs/onboard . We also have a FAQ and tutorials available at https://gitcoin.co/help
If you have any feedback for the team, or just want to say hi, this is them:
- @owocki, @vivek, @Pixelant, @mbeacom, @coderberry, @justin-bean
- <@U55F2LT5L>, <@U88M8173P>, <@U8J2TK1L6>, <@U87BL3KS6>, <@U7Z23ATPB>, <@U9UKDGS01>, <@U88BVQAJD>, <@U9PL1BSAC>, <@U7J5ZPCPQ>, <@U85EFS1MM>
See you around! :spock-hand:
Welcome_bot (and the Gitcoin Team)
Expand Down Expand Up @@ -104,11 +104,8 @@ def new_user_welcome(event):
channel = sc.api_call('im.open', user=user)
channel_id = channel['channel']['id']
sc.api_call(
'chat.postMessage',
channel=channel_id,
unfurl_links=False,
text=MESSAGE,
as_user=True)
'chat.postMessage', channel=channel_id, unfurl_links=False, text=MESSAGE, as_user=True
)


# Serve the slack welcomebot flask app.
Expand Down

0 comments on commit 672aa1f

Please sign in to comment.