Last active
February 9, 2018 23:17
-
-
Save kewitz/926b856efc75cc611f067fae5453cd14 to your computer and use it in GitHub Desktop.
Importing channels in Slack
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const channelCodes = [...document.querySelectorAll('#channels_list optgroup option')].reduce((acc, n) => { | |
acc[n.innerText] = n.value | |
return acc | |
}, {}) | |
TS.boot_data.all_channels.forEach(channel => { | |
if(channelCodes[`#${channel.name}`]) channel.mapping = channelCodes[`#${channel.name}`] | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment