rydogs / play-ping-pong

Play ping pong
0 stars 0 forks source link

Implement mentioned user parser #22

Open rydogs opened 7 years ago

rydogs commented 7 years ago

Write a function that take an String and parse out all mentioned User based on this: https://api.slack.com/slash-commands Configure your slash command to receive expanded entity references

When configuring your slash command, you'll find a toggle that enables this translation of channel names and user names into their correlated IDs. It's labeled: Escape channels, users, and links sent to your app.

After toggling this feature to "on", you'll find that the Bert's equivalent text parameter becomes:

text=<@U012ABCDEF|ernie> don't wake me up at night anymore in <#C012ABCDE|here>

It would be something like this:

public class UserParser implements Function<String, List<User>> {

}