Added nonce support to 'sendMessage'

This commit is contained in:
Zachary Vacura
2016-08-15 16:21:32 -05:00
parent ce198ef005
commit 3b594fd86d
4 changed files with 137 additions and 132 deletions

View File

@@ -658,7 +658,8 @@ export default class InternalClient {
.then(file =>
this.apiRequest("post", Endpoints.CHANNEL_MESSAGES(destination.id), true, {
content: content,
tts: options.tts
tts: options.tts,
nonce: options.nonce
}, {
name: options.file.name,
file: file
@@ -667,7 +668,8 @@ export default class InternalClient {
} else {
return this.apiRequest("post", Endpoints.CHANNEL_MESSAGES(destination.id), true, {
content: content,
tts: options.tts
tts: options.tts,
nonce: options.nonce
})
.then(res => destination.messages.add(new Message(res, destination, this.client)));
}