-
-
Notifications
You must be signed in to change notification settings - Fork 543
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
Add device_id property to Device class #1384
Conversation
@rytilahti could you merge this? |
Codecov Report
@@ Coverage Diff @@
## master #1384 +/- ##
==========================================
- Coverage 84.17% 84.15% -0.02%
==========================================
Files 133 133
Lines 13319 13324 +5
Branches 1483 1484 +1
==========================================
+ Hits 11211 11213 +2
- Misses 1897 1900 +3
Partials 211 211
📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more |
This reverts commit ed32d1a.
@rytilahti processed the feedback |
@rytilahti could you merge? |
Co-authored-by: Teemu R. <tpr@iki.fi>
Co-authored-by: Teemu R. <tpr@iki.fi>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will cause I/O if the device hasn't been initialize prior trying to access the property, but I think the pros outweigh the cons. If needed, this can be revisited in some later point.
Thanks @starkillerOG, this is good to go as soon as some tests are added to check the both code paths! 👍
@rytilahti I just added a test, could you check if that is what you ment. |
This PR adds new
device_id
property toDevice
class.The
device_id
is part of the handshake reply and thus available also on devices with unknown tokens (i.e., it can be useful for use cases where the token is extract from the cloud or other external sources).This is also needed for push server implementation: #1288