FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix: Method name is emit_event, not emit by alexrecuenco · Pull Request #2215 · microsoft/botbuilder-python · GitHub

This repository was archived by the owner on Jan 5, 2026. It is now read-only.

fix: Method name is emit_event, not emit - #2215

Merged
tracyboehrer (tracyboehrer) merged 1 commit into
microsoft:mainfrom
alexrecuenco:patch-dialogcontext-events
Mar 25, 2025
Merged

fix: Method name is emit_event, not emit#2215
tracyboehrer (tracyboehrer) merged 1 commit into
microsoft:mainfrom
alexrecuenco:patch-dialogcontext-events

Conversation

Alex Recuenco (alexrecuenco) commented Mar 14, 2025
edited
Loading

Copy link
Copy Markdown
Contributor

Fixes #2214

Description

The function name is emit_event, not emit

Specific Changes

  • Modified the name

Testing

I would need guidance on what test to modify that currently has emit_event in the codebase.

Copy link
Copy Markdown
Member

Alex Recuenco (@alexrecuenco) were you able to hit this bug in actual usage?

From an initial investigation, it looks like this was code used as preparation for another set of features that are not currently in this SDK

Alex Recuenco (alexrecuenco) commented Mar 20, 2025
edited
Loading

Copy link
Copy Markdown
Contributor Author

Alex Recuenco (@alexrecuenco) were you able to hit this bug in actual usage?

From an initial investigation, it looks like this was code used as preparation for another set of features that are not currently in this SDK

Yes. I emit events, and then those events get captured by a parent component to do some resource refresh handling

My hotfix is to monkey-patch emit to be equal to emit event. With that monkey-patch, this works perfectly well.

The feature exists in the botbuilder-js, and here it is working perfectly well once you do that.

Copy link
Copy Markdown
Contributor Author

Yes. I emit events, and then those events get captured by a parent component to do some resource refresh handling

In particular, this is doing some life cycle generic component, that I am hoping to open source soon.

Any resource that is generated through a dialog with a user is encapsulated.

In particular, the main use is something akin to an authorization middleware within a bot. So you have an AuthorizedComponent that generates the sufficient context, and this component encapsulates token authorization.

The internal dialog then has in the turn state the reference to the required resource/authorization, without having to manually handle authorization in each dialog.

And for long running tasks, internal resources can extend that token by calling refresh(dialog_context), that in turns emits an event and is captured by the nearest matching AuthorizedComponent that refreshes the token/resource.

Copy link
Copy Markdown
Contributor Author

You approved it, but does it need anything else to he merged?

I see it is still not executing the tests, it says that it needs maintainer permissions.

tracyboehrer (tracyboehrer) merged commit ec22a89 into microsoft:main Mar 25, 2025
Alex Recuenco (alexrecuenco) deleted the patch-dialogcontext-events branch March 25, 2025 17:33
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] DialogEvent has no method emit when calling component dialog.

3 participants


Back | FazBrowse Home | New Git URL