swe / rocketchat-to-space
Import your channels with its messages from Rocket.Chat to JetBrains Space.
Installs: 4
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:project
Requires
- php: ^8.1
- ext-json: *
- atdev/rocket-chat: ^1.0
- swe/space-sdk: ^v2
- vlucas/phpdotenv: ^5
README
Import your channels with its messages from Rocket.Chat to JetBrains Space
Edit the files .env
and user-mapping.json
to your needs.
Then call
php import.php
user-mapping.json
In the user-mapping.json
you have to write all the Rocket.Chat and Space usernames. The key is the Rocket.Chat
username, value the Space username.
{ "john-doe": "John.Doe", "jane.doe": "Jane" }
.env
You have to write the credentials into the .env file so the collector/importer can connect to Rocket.Chat/Space.
ROCKET_CHAT_URL=https://chat.example.com ROCKET_CHAT_USER=user@example.com ROCKET_CHAT_PASSWORD=mySecretPassword SPACE_URL=https://example.jetbrains.space SPACE_CLIENT_ID=46511156-4651 SPACE_CLIENT_SECRET=561fsef156ht651cbf
Troubleshooting
Sometimes space seems to be too slow for this import to grant permissions after creating channels so maybe this import will be stopped. In the terminal you can see the channel name and maybe the current import index. So just restart the import with parameters:
php import.php the-shown-channel-name the-maybe-shown-index