Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove id from event stream messages #225

Merged
merged 1 commit into from
Oct 17, 2024

Conversation

tylerslaton
Copy link
Contributor

This is a fix for issue #223. The event stream for messages included a new id entry that was not
expected by the client.

@@ -39,7 +39,10 @@ export async function readStream<T>({

// Process complete messages
for (const message of messages) {
const dataString = message.replace(/^data: /, "").trim();
const dataString = message
.replace(/^(.*)\n/, "")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's be a little more careful here. And we don't need the capture.

Suggested change
.replace(/^(.*)\n/, "")
.replace(/^id.*$/, "")

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had to adjust this recommendation a bit but removed the capture.

This is a fix for issue #223. The event stream for
messages included a new id entry that was not
expected by the client.

Signed-off-by: tylerslaton <[email protected]>
@tylerslaton tylerslaton merged commit 4e32e1f into obot-platform:main Oct 17, 2024
1 check passed
@tylerslaton tylerslaton deleted the fix-223 branch October 17, 2024 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants