{"record":{"id":"7389af8f96044533","repo":"RocketChat/Rocket.Chat","slug":"mentioned-room-not-found","errorCode":null,"errorMessage":"Mentioned room not found","messagePattern":"Mentioned room not found","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"apps/meteor/server/lib/import/classes/converters/MessageConverter.ts","lineNumber":129,"sourceCode":"\t\t\temoji: data.emoji,\n\t\t\talias: data.alias,\n\t\t\t...(data._id ? { _id: data._id } : {}),\n\t\t\t...(data.reactions ? { reactions: await this.convertMessageReactions(data.reactions) } : {}),\n\t\t});\n\t}\n\n\tprotected async convertMessageChannels(message: IImportMessage): Promise<MentionedChannel[] | undefined> {\n\t\tconst { channels } = message;\n\t\tif (!channels) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst result: MentionedChannel[] = [];\n\t\tfor (const importId of channels) {\n\t\t\tconst { name, _id } = (await this.getMentionedChannelData(importId)) || {};\n\n\t\t\tif (!_id || !name) {\n\t\t\t\tthis._logger.warn({ msg: 'Mentioned room not found', importId });\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tmessage.msg = message.msg.replace(new RegExp(`\\#${importId}`, 'gi'), `#${name}`);\n\n\t\t\tresult.push({\n\t\t\t\t_id,\n\t\t\t\tname,\n\t\t\t});\n\t\t}\n\n\t\treturn result;\n\t}\n\n\tprotected async convertMessageMentions(message: IImportMessage): Promise<MentionedUser[] | undefined> {\n\t\tconst { mentions } = message;\n\t\tif (!mentions) {\n\t\t\treturn undefined;","sourceCodeStart":111,"sourceCodeEnd":147,"githubUrl":"https://github.com/RocketChat/Rocket.Chat/blob/b2c16d5842cbe6b69b59bdf6fc5e5f1afcd1f0b0/apps/meteor/server/lib/import/classes/converters/MessageConverter.ts#L111-L147","documentation":"During message import, a #channel mention could not be resolved to an imported room (getMentionedChannelData returned nothing usable). The mention is skipped with continue: the channel is left out of the message's channels array and the raw imported id stays unreplaced in the message text. Non-fatal - the message itself still imports.","triggerScenarios":"An imported message mentions a channel that is not part of the import set: deleted or renamed private channels, channels created after the export, or channels skipped because of earlier import errors.","commonSituations":"Slack exports omitting private channels the exporting admin could not access; selective imports of a few channels while messages cross-reference others; workspace-to-workspace migrations with different channel sets.","solutions":["Import the missing channels too, or accept the loss - only mention metadata and the text substitution are affected","Pre-scan message channel mentions against the imported channel ids before running the import","Post-import, fix leftover raw channel ids in message text with a targeted database update if fidelity matters"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"const importedChannelIds = new Set(channels.map((c) => c._id));\nconst sanitizeMessage = (msg: IImportMessage) => ({\n  ...msg,\n  channels: (msg.channels ?? []).filter((id) => importedChannelIds.has(id)),\n});","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Import the full channel set referenced by messages, not a subset","Expect unresolvable mentions to be dropped silently - audit imports for raw #id leftovers in text","Post-process imported texts to rewrite or strip unresolved mentions when fidelity matters"],"tags":["importer","mentions","channels","data-integrity"],"backgroundTag":"import-missing-channel-reference","analyzedSha":"b2c16d5842cbe6b69b59bdf6fc5e5f1afcd1f0b0","analyzedAt":"2026-08-18T15:26:39.429Z","contentChangedAt":"2026-08-18T15:26:39.429Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}