fix array iteration key/value in gear_util getChatInputs

This commit is contained in:
Nuwan 2023-04-03 23:35:26 +05:30
parent bb1c15205c
commit 8d816d69ed
1 changed files with 3 additions and 3 deletions

View File

@ -393,7 +393,7 @@
var musicPorts = await jamClient.FTUEGetChannels();
//var chatsOnCurrentDevice = context.jamClient.FTUEGetChatInputs(true);
var chatsOnOtherDevices = await context.jamClient.FTUEGetChatInputs(false, true);
// remove all virtual/remote junk form chat inputs. Their key contains' JamKazam when it's Virtual Input or Remote
Object.keys(chatsOnOtherDevices).forEach(function(key) {
if(key.indexOf('JamKazam') > -1) {
@ -448,7 +448,8 @@
})*/
//context._.each(chatsOnOtherDevices, async function (chatChannelName, chatChannelId) {
for(const [chatChannelName, chatChannelId] of Object.entries(chatsOnOtherDevices)) {
for(const [chatChannelId, chatChannelName] of Object.entries(chatsOnOtherDevices)) {
var chatInput = {id: chatChannelId, name: chatChannelName, assignment: null};
if (!deDupper[chatInput.id]) {
var assignment = await context.jamClient.TrackGetAssignment(chatChannelId, true);
@ -459,7 +460,6 @@
}
//})
}
return chatInputs;
}