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

Make parameter in actions.notificationBuilder() optional #368

Closed
mueller-ma opened this issue Aug 4, 2024 · 4 comments · Fixed by #370
Closed

Make parameter in actions.notificationBuilder() optional #368

mueller-ma opened this issue Aug 4, 2024 · 4 comments · Fixed by #370
Labels
enhancement New feature or request

Comments

@mueller-ma
Copy link
Member

Most of my notifications only contain a title as IMO it looks better on Android to have a title than a message. Thus most times I pass an empty string to actions.notificationBuilder(""). Maybe this parameter could be made optional with "" as default value.

@mueller-ma mueller-ma added the enhancement New feature or request label Aug 4, 2024
@mueller-ma
Copy link
Member Author

I discovered that the parameter is actually optional. When using it without a parameter, it crashes the Android app, but that's a different issue (openhab/openhab-android#3794).

@mueller-ma mueller-ma closed this as not planned Won't fix, can't repro, duplicate, stale Aug 5, 2024
@florian-h05
Copy link
Contributor

It was actually not planned that this is supported, rather works by coincidence.
I have just checked the add-on code, null for message is not supported by still works in the cloud connector code.

But I think it would be better to pass an empty string, WDYT?
And it has to be marked as optional in the JSDoc.

@florian-h05 florian-h05 reopened this Aug 6, 2024
@florian-h05
Copy link
Contributor

See #370.

@mueller-ma
Copy link
Member Author

But I think it would be better to pass an empty string, WDYT?

Yes, because that will also work with all clients.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
2 participants