Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No way to fetch a single message #165

Closed
shanness opened this issue Feb 10, 2017 · 3 comments
Closed

No way to fetch a single message #165

shanness opened this issue Feb 10, 2017 · 3 comments

Comments

@shanness
Copy link

As per the docs :-
https://api.slack.com/methods/channels.history

To retrieve a single message, specify its ts value as latest, set inclusive to true, and dial your count down to 1.

This requires taking a messageID (timestamp) which none of the methods do.

My use case is that I need the message text that a user reacts to.

@shanness
Copy link
Author

Here's an impl of it. Tested and working.

shanness@911537a

Doesn't work with non user messages (i.e. bot messages etc) due to this :-

if (GsonHelper.getStringOrNull(event.get("subtype")) == null) {
       messages.add((SlackMessagePosted) SlackJSONMessageParser.decode(session, event));
}

Not sure of the thinking there.

@saikek
Copy link

saikek commented May 30, 2017

Pull request on this one ?

@bcorne
Copy link
Contributor

bcorne commented Oct 26, 2017

Done with cbbe175

@bcorne bcorne closed this as completed Oct 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants