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

Also topic check on publish, and pass variable to differentiate between pub and sub in plugin #195

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ntoonio
Copy link
Contributor

@ntoonio ntoonio commented Nov 28, 2019

Built on top of #190.

When the plugin is run it should know whether it's a publish or subscribe command that's being processed, to allow for more advanced rules for example if a client should be allowed to subscribe to a topic but not publish. This is done by passing command in the kwargs of topic_filtering.

  • command == 1 - Publish
  • command == 0 - Subscribe

@coveralls
Copy link

Coverage Status

Coverage remained the same at ?% when pulling eb270a1 on ntoonio:pull_190 into fc462d1 on beerfactory:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage remained the same at ?% when pulling eb270a1 on ntoonio:pull_190 into fc462d1 on beerfactory:master.

@ntoonio
Copy link
Contributor Author

ntoonio commented Jan 14, 2020

Not to be that guy, but the tests are wrong

@romancardenas
Copy link
Contributor

I think that this pull request should be accepted. I've checked the tests and it crashes for Python 3.6+.

@ntoonio ntoonio changed the title Also topic check on publish, as well as pass command argument to differentiate between publish and subscibe in plugin Also topic check on publish, and pass variable to differentiate between pub and sub in plugin Mar 12, 2020
@FlorianLudwig
Copy link
Contributor

Hi @jacoposartini, @ntoonio, @romancardenas

hbmqtt has been deprecated by it's author. We created a fork here: https://github.com/Yakifo/amqtt

I like this change and would like to include it in our fork.

Would you be interested to create your MR there as well?

Thanks :)

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

5 participants