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

added web.im.replies #339

Merged
merged 1 commit into from
May 16, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions lib/clients/web/facets/im.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* - list: {@link https://api.slack.com/methods/im.list|im.list}
* - mark: {@link https://api.slack.com/methods/im.mark|im.mark}
* - open: {@link https://api.slack.com/methods/im.open|im.open}
* - replies: {@link https://api.slack.com/methods/im.replies|im.replies}
*
*/

Expand Down Expand Up @@ -99,5 +100,22 @@ ImFacet.prototype.open = function open(user, optCb) {
return this.makeAPICall('im.open', requiredArgs, null, optCb);
};

/**
* Returns an entire thread (a message plus all the messages in reply to it).
* @see {@link https://api.slack.com/methods/im.replies|im.replies}
*
* @param {?} channel - Direct message channel to get replies from.
* @param {?} thread_ts - Timestamp of the parent message.
* @param {function=} optCb Optional callback, if not using promises.
*/
ImFacet.prototype.replies = function replies(channel, threadTs, optCb) {
var requiredArgs = {
channel: channel,
thread_ts: threadTs
};

return this.makeAPICall('im.replies', requiredArgs, null, optCb);
};


module.exports = ImFacet;