Fix multipart for requests, fixes #675

This commit is contained in:
Amish Shah
2016-09-10 12:40:45 +01:00
parent 84fe65ec78
commit 4255dcd3ca
3 changed files with 11 additions and 4 deletions

View File

@@ -49,7 +49,8 @@ class RESTMethods {
sendMessage(channel, content, tts, nonce, disableEveryone, file) {
return new Promise((resolve, reject) => {
const $this = this;
content = this.rest.client.resolver.resolveString(content);
if (typeof content !== 'undefined') content = this.rest.client.resolver.resolveString(content);
if (disableEveryone || (typeof disableEveryone === 'undefined' && this.rest.client.options.disable_everyone)) {
content = content.replace('@everyone', '@\u200beveryone').replace('@here', '@\u200bhere');