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

Allow setting session items when calling InjectApplicationMessage #1627

Closed
tboothman opened this issue Dec 15, 2022 · 0 comments · Fixed by #1638
Closed

Allow setting session items when calling InjectApplicationMessage #1627

tboothman opened this issue Dec 15, 2022 · 0 comments · Fixed by #1638
Labels
feature-request New feature or request

Comments

@tboothman
Copy link

Describe the feature request

Allow the user to specify the session items in the virtual session for the server when injecting application messages.

Background:
We inject MQTT messages using InjectApplicationMessage but since 4.0 the InterceptingPublishAsync hook is called for injected messages. We check the session for metadata about the client to see if they're allowed to publish, which is now just an empty dictionary so it gets rejected.

Which project is your feature request related to?

  • Server

Describe the solution you'd like

The method InjectApplicationMessage to take an argument for session items

Describe alternatives you've considered

Set the session items on the server and just use that for every InjectApplicationMessage. There's a property called _sessionItems with an empty dictionary that's currently used as the session. Could add a method to change that property..

@tboothman tboothman added the feature-request New feature or request label Dec 15, 2022
@chkr1011 chkr1011 linked a pull request Dec 28, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant