php-slack / slack

A simple PHP package for sending messages to Slack, with a focus on ease of use and elegant syntax.
BSD 2-Clause "Simplified" License
135 stars 27 forks source link

Playground link does not work #67

Closed C0rn3j closed 3 years ago

C0rn3j commented 3 years ago

Wanted to figure out how to send [text](url) Markdown but found out the playground links in /slack and /playground are both dead

https://github.com/php-slack/playground

alek13 commented 3 years ago

which one links ? can you describe in more detail ?

C0rn3j commented 3 years ago

https://github.com/php-slack/slack#questions https://github.com/php-slack/playground#see-the-real-message The Slack workspace ones.

This link is no longer active
To join this workspace, you’ll need to ask the person who originally invited you for a new link.

Is the []() Markdown functionality unsupported?

I can open a separate issue for the URL Markdown if needed.

$message .= "[".rtrim($commit->message)."](".$commit->url.") by _".$commit->author->name."_";

image

cmbuckley commented 3 years ago

The <|> mrkdwn (not Markdown) functionality is what you want (more info here) but be aware it's the other way around from markdown, i.e. <url|text> instead of [text](url).

$url = 'https://api.slack.com/reference/surfaces/formatting#linking-urls';
$client->send("Please see <$url|Formatting text for app surfaces> :smile:");

I've been meaning to update the playground with some more recent changes, so can add this at the same time.

C0rn3j commented 3 years ago

The <url|text> syntax works great, thanks!

alek13 commented 3 years ago

@C0rn3j thnx. We fix this links