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

Some streamlining #65

Merged
merged 2 commits into from
Feb 12, 2019
Merged

Some streamlining #65

merged 2 commits into from
Feb 12, 2019

Conversation

ccutrer
Copy link
Collaborator

@ccutrer ccutrer commented Feb 12, 2019

some minor optimizations to reduce the /accessories response size

 * events is actually called ev
 * there is no bonjour field
HAP spec allows shortening UUIDs if they're well known Apple ones
doing this drastically reduces response sizes
Copy link
Collaborator

@andylintner andylintner left a comment

Choose a reason for hiding this comment

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

We probably want to allow both long and short ids - there is support in the spec for custom types. Can you change this to use the long id if it doesn't match the expression?

@ccutrer
Copy link
Collaborator Author

ccutrer commented Feb 12, 2019

It already does. Non-Apple IDs won't match the regex, so will not have any replacements done, returning the original string (I tested this).

@andylintner
Copy link
Collaborator

Huh, just read the javadoc on replaceAll - you're right.

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