OperationCode / operationcode_bot

Slack bot for responding to Slack events and handling interactive messages. (not currently in use)
MIT License
8 stars 37 forks source link

Make team join message clickable #58

Closed rickr closed 7 years ago

rickr commented 7 years ago

When a new member joins Operation Code a message is sent to the community channel.

This message can be seen here

By using slacks message formatting we should be able to make this username clickable. Documentation can be found here

Cooperbuilt commented 7 years ago

I think all we need to do is change the team_join.rb file to the following

def notify_community!
      im = Operationcode::Slack::Im.new(
        channel: Event::COMMUNITY_CHANNEL,
        text: ":tada: <@#{@user['id']}> has joined the Slack team :tada:"
        )
      im.make_interactive_with!(
        Operationcode::Slack::Im::Interactive.new(
          text: 'Have they been greeted via direct message?',
          id: 'greeted',
          actions: [
            {name: 'yes', text: 'Yes', value: 'yes'}
          ]
        )
      )
      im.deliver
    

I can't make pull requests on this repo so I will comment it. CAVEAT - not sure if this works

rickr commented 7 years ago

Fixed in #60