RocketChat / RocketChat/Rocket.Chat
User missing on multiple messages when importing from Slack
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 46.1k
- Forks
- 13.9k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 130
Description
Description:
Steps to reproduce:
- Export messages from Slack
- Import into Rocket.Chat
Expected behavior:
All messages are correctly imported, along with their respective user.
Actual behaviour:
Most imported messages are missing their users.

Server Setup Information:
- Version of Rocket.Chat Server: 4.5.0
- Operating System: Ubuntu 20.04
- Deployment Method: Docker-Compose
- Number of Running Instances: 1
- DB Replicaset Oplog:
- NodeJS Version: v14.18.3
- MongoDB Version: 5.0.6 / wiredTiger
Additional context
This is a brand-new instance. The import data contains 389 users and 57844 messages from Slack.
A quick look at the import data doesn't seem to show anything wrong with it. The messages have a user id, and this user id is found in the users list. If needed, I can try to provide an anonymized version of some of those files.
Relevant logs:
The following message appeared multiple times during import:
rocketchat_1 | {"level":50,"time":"2022-03-01T21:17:39.208Z","pid":23,"hostname":"aedc2efe5cd1","name":"","name":"Slack Importer","err":{"type":"Error","message":"importer-message-mentioned-username-not-found","stack":"Error: importer-message-mentioned-username-not-found\n at ImportDataConverter.convertMessageMentions (app/importer/server/classes/ImportDataConverter.ts:472:11)\n at app/importer/server/classes/ImportDataConverter.ts:570:44\n at Array.forEach (<anonymous>)\n at ImportDataConverter.convertMessages (app/importer/server/classes/ImportDataConverter.ts:544:12)\n at app/importer/server/classes/ImporterBase.js:211:20\n at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1257:12)\n at packages/meteor.js:555:25\n at runWithEnvironment (packages/meteor.js:1320:24)"},"msg":"importer-message-mentioned-username-not-found"}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with app/importer/server/classes/ImportDataConverter.ts, especially convertMessageMentions around line 472 and convertMessages around line 544, then reproduce the Slack import using the reported message and user data. Trace why valid Slack user IDs are not associated with imported messages; done means imported messages retain their respective users without the reported username-not-found errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100