Fixed acknowledging of channels (#1411)

* Fixed acknowledging of channels

* using channel#lastMessageID and resolve when it's not present
This commit is contained in:
SpaceEEC
2017-04-25 23:29:08 +02:00
committed by Crawl
parent eb9c280d5f
commit 909b825c94
3 changed files with 6 additions and 3 deletions

View File

@@ -159,7 +159,9 @@ class RESTMethods {
}
ackTextChannel(channel) {
return this.rest.makeRequest('post', Endpoints.Channel(channel).ack, true, { token: this._ackToken }).then(res => {
return this.rest.makeRequest('post', Endpoints.Channel(channel).Message(channel.lastMessageID).ack, true, {
token: this._ackToken,
}).then(res => {
if (res.token) this._ackToken = res.token;
return channel;
});