Open willhoney7 opened 4 years ago
any status update regarding this?
How do you propose we fix this in the SDK without breaking backwards compatibility? Some developers may have added code to process the events differently based on the client platform (Platform.OS
). And if we change the TypeScript type for the event from Callback<any>
(which is what it is now) to something more specific, we could also break existing code.
Perhaps we should just leave the types set to Callback<any>
, and add redundant properties in the event data:
{
connection: { ... },
connectionId: "XXXXX",
// ...
stream: {
connection: { ... },
connectionId: "XXXXX",
// ...
}
}
Bug Report
Current behavior
The
connected
eventHandler of the OTSubscriber component is called with different arguments based on the platform.Steps to reproduce Add a
connected
eventHandler to the OTSubscriber component and look at the event arguments on android and on iOS.Example Project I'm hoping this isn't necessary for this specific case. If necessary, I can provide one.
What is the current bug behavior? Android and iOS have different event result shapes.
What is the expected correct behavior? Android and iOS should have the same event result shape.
Relevant logs and/or screenshots
Other notes It's entirely possible the other events have the same issue. We're only looking at the connected event in our application.