-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
Describe the Bug
There’s a type-safety issue in RoomContext that needs to be fixed.
Right now, the room property is typed as any, which removes TypeScript checks and can lead to hidden bugs.
This also blocks the future migration of RoomView from a class component to hooks.
Steps to Reproduce
Open app/views/RoomView/context.ts
Look at how room is used in components that consume RoomContext
You’ll see there’s no type safety at all
Expected Behavior
The room property should use the correct type, something like:
ISubscription,
TSubscriptionModel,
or a union of both, depending on how RoomView uses it.
This would:
Enable proper TypeScript checking
Allow RoomView to be moved to hooks safely
Prevent type-related crashes at runtime
Actual Behavior
room is currently typed as any
TypeScript can’t catch mistakes
Rocket.Chat Server Version
N/A
Rocket.Chat App Version
4.67.0
Device Name
N/A
OS Version
N/A
Additional Context
No response