title: slack-api: how to format text that contains url?
body: <p>I want to post a message on slack using <a href="https://github.com/allbegray/slack-api" rel="nofollow noreferrer">allbegrey Slack API</a> . The message contains links. How to do so?</p>
  
  <pre><code>  &lt;dependency&gt;
        &lt;groupId&gt;com.github.allbegray&lt;/groupId&gt;
        &lt;artifactId&gt;slack-api&lt;/artifactId&gt;
        &lt;version&gt;1.7.0.RELEASE&lt;/version&gt;
      &lt;/dependency&gt;
  </code></pre>
  
  <h3>Info:</h3>
  
  <p>My message is similar to this one. </p>
  
  <p><a href="https://i.stack.imgur.com/uV6ac.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/uV6ac.png" alt="enter image description here"></a></p>
  
  <h1>Udpate</h1>
  
  <p>If you want to post a simple message to a channel. And your message contains a url. You use the slack markup to format the message and then call <code>postMessage(String channel, String text)</code>.  It works, but if you have attachments it does not work. </p>
  
  <hr>
  
  <p>My message has attachments and I do it like this: </p>
  
  <pre><code>        val text = "Nostrum &lt;https://codepen.io/anon/pen/VRRMNJ|similique&gt; dolores eaque vero voluptatibus illum quibusdam ex sapiente!"
          val message = "Lorem ipsum dolor sit amet consectetur, adipisicing elit. Expedita tempora asperiores corporis hic quidem dicta maiores odit illo perferendis quaerat. Nostrum &lt;https://codepen.io/anon/pen/VRRMNJ|similique&gt; dolores eaque vero voluptatibus illum quibusdam ex sapiente!"
  
  
          val webApiClient = SlackWebApiClientImpl(slackApiToken, null, 8000)
          val channel = webApiClient.openDirectMessageChannel(author.slackId)
          val method = ChatPostMessageMethod(channel, text)
          val attachment = Attachment()
  
          attachment.author_name = author.name
          attachment.author_icon = author.profileImageUrl
          attachment.author_link = "https://XXXX.slack.com/team/${author.slackId}"
          attachment.text =  message
          attachment.pretext = message
  
          method.attachments = listOf(attachment)
          method.isLink_names = true
          webApiClient.postMessage(method)
  </code></pre>
  
  <p>Doing so, I get the message but without clickable links. </p>