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

Refactor mqtt handler #162

Merged
merged 3 commits into from
Apr 9, 2020
Merged

Refactor mqtt handler #162

merged 3 commits into from
Apr 9, 2020

Conversation

viktorsmari
Copy link
Collaborator

@viktorsmari viktorsmari commented Apr 9, 2020

  • Return early if topic is nil
  • Return early if device is nil
  • Remove Raven capture if device was nil - was flooding our Sentry
  • Add test for empty inventory topic

Return early if topic is nil
Return early if device is nil
Add test for empty inventory topic
@viktorsmari viktorsmari requested a review from pral2a April 9, 2020 11:57
payload[:device_id] = device.id
end
payload[:device_id] = device.id
payload[:device_token] = device.device_token # TODO: remove after migration
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@pral2a do you remember if we should remove this line now?

Copy link
Member

Choose a reason for hiding this comment

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

Yes, we can remove it, finally! That is an important decision as it fixes a critical vulnerability

@viktorsmari viktorsmari merged commit 0aa5432 into master Apr 9, 2020
@viktorsmari viktorsmari deleted the refactor-mqtt-handler branch September 25, 2020 15:13
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