{"record":{"id":"85b2e922a33ddff0","repo":"RocketChat/Rocket.Chat","slug":"failed-to-import-the-parent-comment-missing-repli","errorCode":null,"errorMessage":"Failed to import the parent comment; missing replies/reply_users field","messagePattern":"Failed to import the parent comment; missing replies/reply_users field","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"apps/meteor/server/lib/import/slack/SlackImporter.ts","lineNumber":631,"sourceCode":"\t\t\t\t\t\t\tconst replies = new Set<string>();\n\t\t\t\t\t\t\tmessage.reply_users.forEach((item: string) => {\n\t\t\t\t\t\t\t\treplies.add(this._replaceSlackUserId(item));\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\tif (replies.size) {\n\t\t\t\t\t\t\t\tnewMessage.replies = Array.from(replies);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (message.replies) {\n\t\t\t\t\t\t\tconst replies = new Set<string>();\n\t\t\t\t\t\t\tmessage.replies.forEach((item: { user: string }) => {\n\t\t\t\t\t\t\t\treplies.add(this._replaceSlackUserId(item.user));\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\tif (replies.size) {\n\t\t\t\t\t\t\t\tnewMessage.replies = Array.from(replies);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthis.logger.warn({\n\t\t\t\t\t\t\t\tmsg: 'Failed to import the parent comment; missing replies/reply_users field',\n\t\t\t\t\t\t\t\tmessageId: newMessage._id,\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tnewMessage.tcount = message.reply_count;\n\t\t\t\t\t\tnewMessage.tlm = new Date(parseInt(message.latest_reply.split('.')[0]) * 1000);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tnewMessage.tmid = this.makeSlackMessageId(slackChannelId, message.thread_ts);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (message.edited) {\n\t\t\t\t\tnewMessage.editedAt = new Date(parseInt(message.edited.ts.split('.')[0]) * 1000);\n\t\t\t\t\tif (message.edited.user) {\n\t\t\t\t\t\tnewMessage.editedBy = this._replaceSlackUserId(message.edited.user);\n\t\t\t\t\t}\n\t\t\t\t}","sourceCodeStart":613,"sourceCodeEnd":649,"githubUrl":"https://github.com/RocketChat/Rocket.Chat/blob/b2c16d5842cbe6b69b59bdf6fc5e5f1afcd1f0b0/apps/meteor/server/lib/import/slack/SlackImporter.ts#L613-L649","documentation":"SlackImporter warning while converting a thread's parent message: message.thread_ts equals message.ts (this is the thread head) but the export carries neither reply_users nor replies, so the Rocket.Chat replies participant list cannot be rebuilt. tcount and tlm are still set from reply_count/latest_reply; only the replies array is lost. Non-fatal.","triggerScenarios":"Older Slack export formats that did not include reply_users on thread parents; exports where participants deleted accounts; hand-modified export files that dropped those fields.","commonSituations":"Thread metadata partially lost in migration - reply counts survive but the participant list is empty; admins noticing thread replies list inconsistencies after Slack imports.","solutions":["Accept the loss - only the replies participant list is missing; the thread children still import via tmid","Re-export from Slack with current export tooling, which includes reply_users","If thread fidelity matters, post-process: rebuild replies from the imported child messages' u._id values"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"// Post-process: rebuild a missing parent replies list from imported child messages\nconst replies = await Messages.find({ tmid: parentId }, { fields: { 'u._id': 1 } }).toArray();\nif (replies.length) {\n  await Messages.updateOne({ _id: parentId }, { $set: { replies: [...new Set(replies.map((m) => m.u._id))] } });\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use up-to-date Slack export tooling so thread parents carry reply_users","Treat thread parent metadata as best-effort and verify thread counts after import","Rebuild replies from child messages whenever the parent list is absent"],"tags":["importer","slack","threads","metadata"],"backgroundTag":"import-missing-thread-metadata","analyzedSha":"b2c16d5842cbe6b69b59bdf6fc5e5f1afcd1f0b0","analyzedAt":"2026-08-18T15:26:39.429Z","contentChangedAt":"2026-08-18T15:26:39.429Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}