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
/* | |
* This script migrates all messages and users | |
* from a Sendbird supergroup channel to a group channel | |
* by creating a new group channel and deleting the old supergroup channel. | |
* | |
* Note: make sure you have chat history enabled for newly joined members | |
* Enable it by selecting an App from the Dashboard and toggle the checkbox under | |
* Settings > Chat > Group Channels > Chat history | |
* | |
* To use this script, you need to change APP_ID and API_TOKEN below |