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

Added UserName property to various Server EventArgs. #2123

Merged
merged 4 commits into from
Dec 10, 2024

Conversation

xljiulang
Copy link
Contributor

In server events, directly carrying the client's UserName may bring some convenience to upper-level developers, and adding the UserName will not cause any computing overhead.

Copy link
Collaborator

@chkr1011 chkr1011 left a comment

Choose a reason for hiding this comment

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

Good work. I have 1 improvement.

@@ -255,6 +255,7 @@ public Task InjectApplicationMessage(InjectedMqttApplicationMessage injectedAppl

return _clientSessionsManager.DispatchApplicationMessage(
injectedApplicationMessage.SenderClientId,
senderUserName: null,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Consider exposing the SenderUserName as well in the injected application message. Otherwise, the new properties are null in these cases.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK. It's done.

@chkr1011 chkr1011 merged commit e2f8d0f into dotnet:master Dec 10, 2024
3 checks passed
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