{"record":{"id":"97b68d263b15ec51","repo":"RocketChat/Rocket.Chat","slug":"unrecognized-typing-scope-provided","errorCode":null,"errorMessage":"Unrecognized typing scope provided","messagePattern":"Unrecognized typing scope provided","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"apps/meteor/app/apps/server/bridges/messages.ts","lineNumber":116,"sourceCode":"\t\tawait Users.findByIds(users, { projection: { _id: 1 } }).forEach(\n\t\t\t({ _id }: { _id: string }) =>\n\t\t\t\tvoid api.broadcast('notify.ephemeralMessage', _id, room.id, {\n\t\t\t\t\t...convertedMessage,\n\t\t\t\t}),\n\t\t);\n\t}\n\n\tprotected async typing({ scope, id, username, isTyping }: ITypingDescriptor): Promise<void> {\n\t\tswitch (scope) {\n\t\t\tcase 'room':\n\t\t\t\tif (!username) {\n\t\t\t\t\tthrow new Error('Invalid username');\n\t\t\t\t}\n\n\t\t\t\tnotifications.notifyRoom(id, 'user-activity', username, isTyping ? ['user-typing'] : []);\n\t\t\t\treturn;\n\t\t\tdefault:\n\t\t\t\tthrow new Error('Unrecognized typing scope provided');\n\t\t}\n\t}\n\n\tprivate isValidReaction(reaction: Reaction): boolean {\n\t\treturn reaction.startsWith(':') && reaction.endsWith(':');\n\t}\n\n\tprotected async addReaction(messageId: string, userId: string, reaction: Reaction): Promise<void> {\n\t\tif (!this.isValidReaction(reaction)) {\n\t\t\tthrow new Error('Invalid reaction');\n\t\t}\n\n\t\treturn executeSetReaction(userId, reaction, messageId, true);\n\t}\n\n\tprotected async removeReaction(messageId: string, userId: string, reaction: Reaction): Promise<void> {\n\t\tif (!this.isValidReaction(reaction)) {\n\t\t\tthrow new Error('Invalid reaction');","sourceCodeStart":98,"sourceCodeEnd":134,"githubUrl":"https://github.com/RocketChat/Rocket.Chat/blob/f9d3ec372bb580fa8d036f94cf03925a478ef768/apps/meteor/app/apps/server/bridges/messages.ts#L98-L134","documentation":"Thrown by AppMessageBridge.typing when scope is neither 'room' nor any other recognized value, i.e. the default branch of the switch. Currently only 'room' scope is implemented; any other scope string is unsupported and rejected.","triggerScenarios":"An App calls the typing notifier with a scope value other than 'room' (e.g. 'user', 'channel', or a typo like 'Room'/'rooms'), hitting the default branch.","commonSituations":"App passes a future/planned scope not yet implemented; typo or wrong casing in the scope literal; App copies a scope constant from another accessor that does not apply to typing; version mismatch where the apps-engine defines scopes the bridge does not yet handle.","solutions":["Use exactly scope: 'room' for typing notifications in the current version.","Check for case-sensitivity and trailing whitespace in the scope string.","Confirm the ITypingDescriptor scope union against the installed apps-engine/bridge version.","If a new scope is needed, verify the bridge supports it before using it (file an issue otherwise)."],"exampleFix":"// before\nawait app.getModify().typing({ scope: 'user', id: userId, username, isTyping: true });\n\n// after\n// only 'room' scope is supported by the message typing bridge\nawait app.getModify().typing({ scope: 'room', id: room.id, username, isTyping: true });","handlingStrategy":"validation","validationCode":"const SUPPORTED_TYPING_SCOPES = new Set(['room']);\nif (!SUPPORTED_TYPING_SCOPES.has(descriptor.scope)) {\n  throw new Error(`Unsupported typing scope '${descriptor.scope}'. Supported: room`);\n}\nawait app.getModify().typing(descriptor);","typeGuard":"const isSupportedTypingScope = (scope: string): scope is 'room' => scope === 'room';","tryCatchPattern":"try {\n  await app.getModify().typing(descriptor);\n} catch (e) {\n  if ((e as Error).message.includes('Unrecognized typing scope')) {\n    // downgrade to room scope or skip the typing indicator\n  }\n  throw e;\n}","preventionTips":["Use exactly scope: 'room' for typing in the current version.","Watch for case sensitivity and whitespace in the scope literal.","Confirm supported scopes against the installed apps-engine/bridge version."],"tags":["apps-engine","message","typing","scope","validation"],"backgroundTag":null,"analyzedSha":"f9d3ec372bb580fa8d036f94cf03925a478ef768","analyzedAt":"2026-08-12T19:07:17.372Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}