|
|
@ -70,8 +70,8 @@ angular.module('myApp.services') |
|
|
|
var dialogsNum = 0; |
|
|
|
var dialogsNum = 0; |
|
|
|
var minDialogsIndex = Math.pow(2, 50); |
|
|
|
var minDialogsIndex = Math.pow(2, 50); |
|
|
|
|
|
|
|
|
|
|
|
var migratedFrom = {}; |
|
|
|
var migratedFromTo = {}; |
|
|
|
var migratedTo = {}; |
|
|
|
var migratedToFrom = {}; |
|
|
|
|
|
|
|
|
|
|
|
function getConversations (query, offsetIndex, limit) { |
|
|
|
function getConversations (query, offsetIndex, limit) { |
|
|
|
var curDialogStorage = dialogsStorage; |
|
|
|
var curDialogStorage = dialogsStorage; |
|
|
@ -234,8 +234,8 @@ angular.module('myApp.services') |
|
|
|
var chat = AppChatsManager.getChat(-peerID); |
|
|
|
var chat = AppChatsManager.getChat(-peerID); |
|
|
|
if (chat && chat.migrated_to && chat.pFlags.deactivated) { |
|
|
|
if (chat && chat.migrated_to && chat.pFlags.deactivated) { |
|
|
|
var migratedToPeer = AppPeersManager.getPeerID(chat.migrated_to); |
|
|
|
var migratedToPeer = AppPeersManager.getPeerID(chat.migrated_to); |
|
|
|
migratedFrom[peerID] = migratedToPeer; |
|
|
|
migratedFromTo[peerID] = migratedToPeer; |
|
|
|
migratedTo[migratedToPeer] = peerID; |
|
|
|
migratedToFrom[migratedToPeer] = peerID; |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -323,8 +323,7 @@ angular.module('myApp.services') |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function requestHistory (inputPeer, maxID, limit, offset) { |
|
|
|
function requestHistory (peerID, maxID, limit, offset) { |
|
|
|
var peerID = AppPeersManager.getPeerID(inputPeer); |
|
|
|
|
|
|
|
var isChannel = AppPeersManager.isChannel(peerID); |
|
|
|
var isChannel = AppPeersManager.isChannel(peerID); |
|
|
|
var isMegagroup = isChannel && AppPeersManager.isMegagroup(peerID); |
|
|
|
var isMegagroup = isChannel && AppPeersManager.isMegagroup(peerID); |
|
|
|
|
|
|
|
|
|
|
@ -341,7 +340,7 @@ angular.module('myApp.services') |
|
|
|
}); |
|
|
|
}); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
promise = MtpApiManager.invokeApi('messages.getHistory', { |
|
|
|
promise = MtpApiManager.invokeApi('messages.getHistory', { |
|
|
|
peer: inputPeer, |
|
|
|
peer: AppPeersManager.getInputPeerByID(peerID), |
|
|
|
offset_id: maxID ? getMessageLocalID(maxID) : 0, |
|
|
|
offset_id: maxID ? getMessageLocalID(maxID) : 0, |
|
|
|
add_offset: offset || 0, |
|
|
|
add_offset: offset || 0, |
|
|
|
limit: limit || 0 |
|
|
|
limit: limit || 0 |
|
|
@ -472,15 +471,14 @@ angular.module('myApp.services') |
|
|
|
}; |
|
|
|
}; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function fillHistoryStorage (inputPeer, maxID, fullLimit, historyStorage) { |
|
|
|
function fillHistoryStorage (peerID, maxID, fullLimit, historyStorage) { |
|
|
|
// console.log('fill history storage', inputPeer, maxID, fullLimit, angular.copy(historyStorage));
|
|
|
|
// console.log('fill history storage', peerID, maxID, fullLimit, angular.copy(historyStorage));
|
|
|
|
return requestHistory (inputPeer, maxID, fullLimit).then(function (historyResult) { |
|
|
|
var migratedNextPeer = migratedFromTo[peerID]; |
|
|
|
|
|
|
|
var migratedPrevPeer = migratedToFrom[peerID]; |
|
|
|
|
|
|
|
var isMigrated = migratedNextPeer !== undefined || migratedPrevPeer !== undefined; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return requestHistory (peerID, maxID, fullLimit).then(function (historyResult) { |
|
|
|
historyStorage.count = historyResult.count || historyResult.messages.length; |
|
|
|
historyStorage.count = historyResult.count || historyResult.messages.length; |
|
|
|
var peerID = AppPeersManager.getPeerID(inputPeer); |
|
|
|
|
|
|
|
var migratedFromPeer = migratedTo[peerID]; |
|
|
|
|
|
|
|
// if () {
|
|
|
|
|
|
|
|
// historyStorage.count++;
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var offset = 0; |
|
|
|
var offset = 0; |
|
|
|
if (!maxID && historyResult.messages.length) { |
|
|
|
if (!maxID && historyResult.messages.length) { |
|
|
@ -494,22 +492,41 @@ angular.module('myApp.services') |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var wasTotalCount = historyStorage.history.length; |
|
|
|
|
|
|
|
|
|
|
|
historyStorage.history.splice(offset, historyStorage.history.length - offset); |
|
|
|
historyStorage.history.splice(offset, historyStorage.history.length - offset); |
|
|
|
angular.forEach(historyResult.messages, function (message) { |
|
|
|
angular.forEach(historyResult.messages, function (message) { |
|
|
|
if (mergeReplyKeyboard(historyStorage, message)) { |
|
|
|
if (mergeReplyKeyboard(historyStorage, message)) { |
|
|
|
$rootScope.$broadcast('history_reply_markup', {peerID: AppPeersManager.getPeerID(inputPeer)}); |
|
|
|
$rootScope.$broadcast('history_reply_markup', {peerID: peerID}); |
|
|
|
} |
|
|
|
} |
|
|
|
historyStorage.history.push(message.mid); |
|
|
|
historyStorage.history.push(message.mid); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
fullLimit -= historyResult.messages.length; |
|
|
|
var totalCount = historyStorage.history.length; |
|
|
|
|
|
|
|
fullLimit -= (totalCount - wasTotalCount); |
|
|
|
|
|
|
|
|
|
|
|
if (fullLimit > 0 && |
|
|
|
if (isMigrated) { |
|
|
|
(historyStorage.history.length < historyStorage.count || migratedFromPeer)) { |
|
|
|
historyStorage.count = Math.max(historyStorage.count, totalCount) + 1; |
|
|
|
maxID = historyStorage.history[historyStorage.history.length - 1]; |
|
|
|
|
|
|
|
return fillHistoryStorage(inputPeer, maxID, fullLimit, historyStorage); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (fullLimit > 0) { |
|
|
|
|
|
|
|
maxID = historyStorage.history[totalCount - 1]; |
|
|
|
|
|
|
|
if (isMigrated) { |
|
|
|
|
|
|
|
if (!historyResult.messages.length) { |
|
|
|
|
|
|
|
if (migratedPrevPeer) { |
|
|
|
|
|
|
|
maxID = 0; |
|
|
|
|
|
|
|
peerID = migratedPrevPeer; |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
historyStorage.count = totalCount; |
|
|
|
|
|
|
|
return true; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return fillHistoryStorage(peerID, maxID, fullLimit, historyStorage); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else if (totalCount < historyStorage.count) { |
|
|
|
|
|
|
|
return fillHistoryStorage(peerID, maxID, fullLimit, historyStorage); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
return true; |
|
|
|
return true; |
|
|
|
}); |
|
|
|
}); |
|
|
|
}; |
|
|
|
}; |
|
|
@ -529,9 +546,11 @@ angular.module('myApp.services') |
|
|
|
return $q.when(result); |
|
|
|
return $q.when(result); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function getHistory (inputPeer, maxID, limit, backLimit, prerendered) { |
|
|
|
function getHistory (peerID, maxID, limit, backLimit, prerendered) { |
|
|
|
var peerID = AppPeersManager.getPeerID(inputPeer), |
|
|
|
if (migratedFromTo[peerID]) { |
|
|
|
historyStorage = historiesStorage[peerID], |
|
|
|
peerID = migratedFromTo[peerID]; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
var historyStorage = historiesStorage[peerID], |
|
|
|
offset = 0, |
|
|
|
offset = 0, |
|
|
|
offsetNotFound = false, |
|
|
|
offsetNotFound = false, |
|
|
|
unreadOffset = false, |
|
|
|
unreadOffset = false, |
|
|
@ -543,6 +562,15 @@ angular.module('myApp.services') |
|
|
|
historyStorage = historiesStorage[peerID] = {count: null, history: [], pending: []}; |
|
|
|
historyStorage = historiesStorage[peerID] = {count: null, history: [], pending: []}; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var isMigrated = false; |
|
|
|
|
|
|
|
var reqPeerID = peerID; |
|
|
|
|
|
|
|
if (migratedToFrom[peerID]) { |
|
|
|
|
|
|
|
isMigrated = true; |
|
|
|
|
|
|
|
if (maxID && maxID < fullMsgIDModulus) { |
|
|
|
|
|
|
|
reqPeerID = migratedToFrom[peerID]; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (!limit && !maxID) { |
|
|
|
if (!limit && !maxID) { |
|
|
|
var foundDialog = getDialogByPeerID(peerID)[0]; |
|
|
|
var foundDialog = getDialogByPeerID(peerID)[0]; |
|
|
|
if (foundDialog && foundDialog.unread_count > 1) { |
|
|
|
if (foundDialog && foundDialog.unread_count > 1) { |
|
|
@ -611,8 +639,11 @@ angular.module('myApp.services') |
|
|
|
offset = -backLimit; |
|
|
|
offset = -backLimit; |
|
|
|
limit += backLimit; |
|
|
|
limit += backLimit; |
|
|
|
} |
|
|
|
} |
|
|
|
return requestHistory(inputPeer, maxID, limit, offset).then(function (historyResult) { |
|
|
|
return requestHistory(reqPeerID, maxID, limit, offset).then(function (historyResult) { |
|
|
|
historyStorage.count = historyResult.count || historyResult.messages.length; |
|
|
|
historyStorage.count = historyResult.count || historyResult.messages.length; |
|
|
|
|
|
|
|
if (isMigrated) { |
|
|
|
|
|
|
|
historyStorage.count++; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
var history = []; |
|
|
|
var history = []; |
|
|
|
angular.forEach(historyResult.messages, function (message) { |
|
|
|
angular.forEach(historyResult.messages, function (message) { |
|
|
@ -631,7 +662,7 @@ angular.module('myApp.services') |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return fillHistoryStorage(inputPeer, maxID, limit, historyStorage).then(function () { |
|
|
|
return fillHistoryStorage(peerID, maxID, limit, historyStorage).then(function () { |
|
|
|
offset = 0; |
|
|
|
offset = 0; |
|
|
|
if (maxID > 0) { |
|
|
|
if (maxID > 0) { |
|
|
|
for (offset = 0; offset < historyStorage.history.length; offset++) { |
|
|
|
for (offset = 0; offset < historyStorage.history.length; offset++) { |
|
|
@ -728,10 +759,9 @@ angular.module('myApp.services') |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function getSearch (inputPeer, query, inputFilter, maxID, limit) { |
|
|
|
function getSearch (peerID, query, inputFilter, maxID, limit) { |
|
|
|
var foundMsgs = [], |
|
|
|
var foundMsgs = [], |
|
|
|
useSearchCache = !query, |
|
|
|
useSearchCache = !query, |
|
|
|
peerID = AppPeersManager.getPeerID(inputPeer), |
|
|
|
|
|
|
|
newSearchFilter = {peer: peerID, filter: inputFilter}, |
|
|
|
newSearchFilter = {peer: peerID, filter: inputFilter}, |
|
|
|
sameSearchCache = useSearchCache && angular.equals(lastSearchFilter, newSearchFilter); |
|
|
|
sameSearchCache = useSearchCache && angular.equals(lastSearchFilter, newSearchFilter); |
|
|
|
|
|
|
|
|
|
|
@ -817,7 +847,7 @@ angular.module('myApp.services') |
|
|
|
} |
|
|
|
} |
|
|
|
apiPromise = MtpApiManager.invokeApi('messages.search', { |
|
|
|
apiPromise = MtpApiManager.invokeApi('messages.search', { |
|
|
|
flags: flags, |
|
|
|
flags: flags, |
|
|
|
peer: inputPeer, |
|
|
|
peer: AppPeersManager.getInputPeerByID(peerID), |
|
|
|
q: query || '', |
|
|
|
q: query || '', |
|
|
|
filter: inputFilter || {_: 'inputMessagesFilterEmpty'}, |
|
|
|
filter: inputFilter || {_: 'inputMessagesFilterEmpty'}, |
|
|
|
min_date: 0, |
|
|
|
min_date: 0, |
|
|
@ -884,6 +914,7 @@ angular.module('myApp.services') |
|
|
|
|
|
|
|
|
|
|
|
function deleteMessages (messageIDs) { |
|
|
|
function deleteMessages (messageIDs) { |
|
|
|
var splitted = splitMessageIDsByChannels(messageIDs); |
|
|
|
var splitted = splitMessageIDsByChannels(messageIDs); |
|
|
|
|
|
|
|
debugger; |
|
|
|
var promises = []; |
|
|
|
var promises = []; |
|
|
|
angular.forEach(splitted.msgIDs, function (msgIDs, channelID) { |
|
|
|
angular.forEach(splitted.msgIDs, function (msgIDs, channelID) { |
|
|
|
var promise; |
|
|
|
var promise; |
|
|
@ -940,10 +971,9 @@ angular.module('myApp.services') |
|
|
|
return $q.all(promises); |
|
|
|
return $q.all(promises); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function readHistory (inputPeer) { |
|
|
|
function readHistory (peerID) { |
|
|
|
// console.trace('start read');
|
|
|
|
// console.trace('start read');
|
|
|
|
var peerID = AppPeersManager.getPeerID(inputPeer), |
|
|
|
var isChannel = AppPeersManager.isChannel(peerID), |
|
|
|
isChannel = AppPeersManager.isChannel(peerID), |
|
|
|
|
|
|
|
historyStorage = historiesStorage[peerID], |
|
|
|
historyStorage = historiesStorage[peerID], |
|
|
|
foundDialog = getDialogByPeerID(peerID)[0]; |
|
|
|
foundDialog = getDialogByPeerID(peerID)[0]; |
|
|
|
|
|
|
|
|
|
|
@ -981,7 +1011,7 @@ angular.module('myApp.services') |
|
|
|
}); |
|
|
|
}); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
apiPromise = MtpApiManager.invokeApi('messages.readHistory', { |
|
|
|
apiPromise = MtpApiManager.invokeApi('messages.readHistory', { |
|
|
|
peer: inputPeer, |
|
|
|
peer: AppPeersManager.getInputPeerByID(peerID), |
|
|
|
max_id: 0 |
|
|
|
max_id: 0 |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
@ -1059,9 +1089,8 @@ angular.module('myApp.services') |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function flushHistory (inputPeer) { |
|
|
|
function flushHistory (peerID) { |
|
|
|
var peerID = AppPeersManager.getPeerID(inputPeer); |
|
|
|
return doFlushHistory(AppPeersManager.getInputPeerByID(peerID)).then(function () { |
|
|
|
return doFlushHistory(inputPeer).then(function () { |
|
|
|
|
|
|
|
var foundDialog = getDialogByPeerID(peerID); |
|
|
|
var foundDialog = getDialogByPeerID(peerID); |
|
|
|
if (foundDialog[0]) { |
|
|
|
if (foundDialog[0]) { |
|
|
|
dialogsStorage.dialogs.splice(foundDialog[1], 1); |
|
|
|
dialogsStorage.dialogs.splice(foundDialog[1], 1); |
|
|
@ -1201,7 +1230,6 @@ angular.module('myApp.services') |
|
|
|
randomID = [nextRandomInt(0xFFFFFFFF), nextRandomInt(0xFFFFFFFF)], |
|
|
|
randomID = [nextRandomInt(0xFFFFFFFF), nextRandomInt(0xFFFFFFFF)], |
|
|
|
randomIDS = bigint(randomID[0]).shiftLeft(32).add(bigint(randomID[1])).toString(), |
|
|
|
randomIDS = bigint(randomID[0]).shiftLeft(32).add(bigint(randomID[1])).toString(), |
|
|
|
historyStorage = historiesStorage[peerID], |
|
|
|
historyStorage = historiesStorage[peerID], |
|
|
|
inputPeer = AppPeersManager.getInputPeerByID(peerID), |
|
|
|
|
|
|
|
flags = 0, |
|
|
|
flags = 0, |
|
|
|
pFlags = {}, |
|
|
|
pFlags = {}, |
|
|
|
replyToMsgID = options.replyToMsgID, |
|
|
|
replyToMsgID = options.replyToMsgID, |
|
|
@ -1285,7 +1313,7 @@ angular.module('myApp.services') |
|
|
|
// console.log(flags, entities);
|
|
|
|
// console.log(flags, entities);
|
|
|
|
MtpApiManager.invokeApi('messages.sendMessage', { |
|
|
|
MtpApiManager.invokeApi('messages.sendMessage', { |
|
|
|
flags: flags, |
|
|
|
flags: flags, |
|
|
|
peer: inputPeer, |
|
|
|
peer: AppPeersManager.getInputPeerByID(peerID), |
|
|
|
message: text, |
|
|
|
message: text, |
|
|
|
random_id: randomID, |
|
|
|
random_id: randomID, |
|
|
|
reply_to_msg_id: getMessageLocalID(replyToMsgID), |
|
|
|
reply_to_msg_id: getMessageLocalID(replyToMsgID), |
|
|
@ -1343,7 +1371,6 @@ angular.module('myApp.services') |
|
|
|
randomID = [nextRandomInt(0xFFFFFFFF), nextRandomInt(0xFFFFFFFF)], |
|
|
|
randomID = [nextRandomInt(0xFFFFFFFF), nextRandomInt(0xFFFFFFFF)], |
|
|
|
randomIDS = bigint(randomID[0]).shiftLeft(32).add(bigint(randomID[1])).toString(), |
|
|
|
randomIDS = bigint(randomID[0]).shiftLeft(32).add(bigint(randomID[1])).toString(), |
|
|
|
historyStorage = historiesStorage[peerID], |
|
|
|
historyStorage = historiesStorage[peerID], |
|
|
|
inputPeer = AppPeersManager.getInputPeerByID(peerID), |
|
|
|
|
|
|
|
flags = 0, |
|
|
|
flags = 0, |
|
|
|
pFlags = {}, |
|
|
|
pFlags = {}, |
|
|
|
replyToMsgID = options.replyToMsgID, |
|
|
|
replyToMsgID = options.replyToMsgID, |
|
|
@ -1474,7 +1501,7 @@ angular.module('myApp.services') |
|
|
|
} |
|
|
|
} |
|
|
|
MtpApiManager.invokeApi('messages.sendMedia', { |
|
|
|
MtpApiManager.invokeApi('messages.sendMedia', { |
|
|
|
flags: flags, |
|
|
|
flags: flags, |
|
|
|
peer: inputPeer, |
|
|
|
peer: AppPeersManager.getInputPeerByID(peerID), |
|
|
|
media: inputMedia, |
|
|
|
media: inputMedia, |
|
|
|
random_id: randomID, |
|
|
|
random_id: randomID, |
|
|
|
reply_to_msg_id: getMessageLocalID(replyToMsgID) |
|
|
|
reply_to_msg_id: getMessageLocalID(replyToMsgID) |
|
|
@ -1532,7 +1559,6 @@ angular.module('myApp.services') |
|
|
|
randomID = [nextRandomInt(0xFFFFFFFF), nextRandomInt(0xFFFFFFFF)], |
|
|
|
randomID = [nextRandomInt(0xFFFFFFFF), nextRandomInt(0xFFFFFFFF)], |
|
|
|
randomIDS = bigint(randomID[0]).shiftLeft(32).add(bigint(randomID[1])).toString(), |
|
|
|
randomIDS = bigint(randomID[0]).shiftLeft(32).add(bigint(randomID[1])).toString(), |
|
|
|
historyStorage = historiesStorage[peerID], |
|
|
|
historyStorage = historiesStorage[peerID], |
|
|
|
inputPeer = AppPeersManager.getInputPeerByID(peerID), |
|
|
|
|
|
|
|
replyToMsgID = options.replyToMsgID, |
|
|
|
replyToMsgID = options.replyToMsgID, |
|
|
|
isChannel = AppPeersManager.isChannel(peerID), |
|
|
|
isChannel = AppPeersManager.isChannel(peerID), |
|
|
|
isMegagroup = isChannel && AppPeersManager.isMegagroup(peerID), |
|
|
|
isMegagroup = isChannel && AppPeersManager.isMegagroup(peerID), |
|
|
@ -1635,7 +1661,7 @@ angular.module('myApp.services') |
|
|
|
|
|
|
|
|
|
|
|
MtpApiManager.invokeApi('messages.sendMedia', { |
|
|
|
MtpApiManager.invokeApi('messages.sendMedia', { |
|
|
|
flags: flags, |
|
|
|
flags: flags, |
|
|
|
peer: inputPeer, |
|
|
|
peer: AppPeersManager.getInputPeerByID(peerID), |
|
|
|
media: inputMedia, |
|
|
|
media: inputMedia, |
|
|
|
random_id: randomID, |
|
|
|
random_id: randomID, |
|
|
|
reply_to_msg_id: getMessageLocalID(replyToMsgID) |
|
|
|
reply_to_msg_id: getMessageLocalID(replyToMsgID) |
|
|
@ -2827,10 +2853,9 @@ angular.module('myApp.services') |
|
|
|
|
|
|
|
|
|
|
|
function reloadChannelDialog (channelID) { |
|
|
|
function reloadChannelDialog (channelID) { |
|
|
|
var peerID = -channelID; |
|
|
|
var peerID = -channelID; |
|
|
|
var inputPeer = AppPeersManager.getInputPeerByID(peerID); |
|
|
|
|
|
|
|
return $q.all([ |
|
|
|
return $q.all([ |
|
|
|
AppProfileManager.getChannelFull(channelID, true), |
|
|
|
AppProfileManager.getChannelFull(channelID, true), |
|
|
|
getHistory(inputPeer, 0) |
|
|
|
getHistory(peerID, 0) |
|
|
|
]).then(function (results) { |
|
|
|
]).then(function (results) { |
|
|
|
var channelResult = results[0]; |
|
|
|
var channelResult = results[0]; |
|
|
|
var historyResult = results[1]; |
|
|
|
var historyResult = results[1]; |
|
|
|