fixed some internal callbacks

This commit is contained in:
hydrabolt
2015-08-15 21:01:47 +01:00
parent 1b1d027f1e
commit 73e9e9ec4c
4 changed files with 67 additions and 17 deletions

View File

@@ -465,7 +465,7 @@ exports.Client.prototype.sendMessage = function( destination, toSend, callback,
channel_id = destination.channel.id;
} else if ( destination instanceof User ) {
var destId = self.PMList.deepFilter( [ "user", "id" ], destination.id, true );
console.log(destId);
if ( destId ) {
channel_id = destId.id;
} else {
@@ -530,7 +530,7 @@ exports.Client.prototype.deleteMessage = function( message, callback ) {
exports.Client.prototype.getChannelLogs = function( channel, amount, callback ) {
var self = this;
Internal.XHR.getChannelLogs( self.token, message.channel.id, ( amount || 50 ), function( err, data ) {
Internal.XHR.getChannelLogs( self.token, channel.id, ( amount || 50 ), function( err, data ) {
var logs = new List( "id" );
for ( message of data ) {