binaryminds / react-native-sse

Event Source implementation for React Native. Server-Sent Events (SSE) for iOS and Android 🚀
https://www.npmjs.com/package/react-native-sse
MIT License
175 stars 27 forks source link

Add `lastEventId` and `url` in events with defined type #2

Closed vkourtis closed 3 years ago

vkourtis commented 3 years ago

When a known event type was coming from the server, the lastEventId and the url were not added into the dispatched event.

This adds lastEventId and the url in all MessageEvents. Additionally, a small refactoring was done to avoid the if altogether.

wojciechkrol commented 3 years ago

Hello @vkourtis,

Thank you. It looks fine and we're ready to merge it but before that we need TypeScript interface adjustments for your changes.

vkourtis commented 3 years ago

@wojciechkrol missed that!

Will this work ec610db?

wojciechkrol commented 3 years ago

@vkourtis Sure, thank you!

wojciechkrol commented 3 years ago

@vkourtis check new version 😊

Have a nice day!