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

Don't add activity and reference fields to outgoing message #1707

Conversation

Naktibalda
Copy link
Contributor

I noticed that Botkit adds some garbage fields to outgoing fields, e.g. {"type":"message","text":"Hi...","channelId":"websocket","conversation":{"id":"98f515de-b10a-4b4c-51b9-d6fa3f0e1688"},"from":{"id":"bot"},"recipient":{"id":"98f515de-b10a-4b4c-51b9-d6fa3f0e1688"}}

So I decided to remove them.

Previous activity check was incorrect and allowed falsy values to be added to channelData.
Reference fields weren't checked at all so they were sent to client.

Previous activity check was incorrect and allowed falsy values to be added to channelData.
Reference fields weren't checked at all so they were sent to client.
@Naktibalda Naktibalda force-pushed the bugfix/remove-framework-fields-from-message branch from 8c2b05f to f3f714e Compare July 3, 2019 16:13
@Naktibalda
Copy link
Contributor Author

Actually, I don't like this patch anymore,
I think that applyConversationReference call
at https://github.com/howdyai/botkit/blob/master/packages/botkit/src/botworker.ts#L136 is completely unnecessary, because the next step strips those fields.

@Naktibalda
Copy link
Contributor Author

I copied the good part of this change to #1708

@Naktibalda Naktibalda closed this Jul 3, 2019
@Naktibalda Naktibalda reopened this Jul 3, 2019
@Naktibalda
Copy link
Contributor Author

Another U-turn, I realized that this change was good.

@benbrown
Copy link
Contributor

This fix has been indirectly incorporated into 4.5! Thanks for the contribution!

@benbrown benbrown closed this Jul 24, 2019
@Naktibalda
Copy link
Contributor Author

Thanks, I upgraded to 4.5 and it is working as expected.

@Naktibalda Naktibalda deleted the bugfix/remove-framework-fields-from-message branch July 25, 2019 07:44
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.

None yet

2 participants