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

Better convey function "notify" constrains #175

Open
EnriqSSSS opened this issue Jul 15, 2024 · 3 comments
Open

Better convey function "notify" constrains #175

EnriqSSSS opened this issue Jul 15, 2024 · 3 comments

Comments

@EnriqSSSS
Copy link

Hello, i recently began to use this plugin on nextcloud to automate somethings.

I was having some issues involving the notify function. After some time of debugging i figured out that both the subject and message field of the notify function have a hard limit of character in 64.

This isn't a bug or anything, I just think that would neat to have this info on the docs

@Raudius
Copy link
Owner

Raudius commented Jul 15, 2024

Hi Enriq,

Thanks a lot for the suggestion.

I am curious, what was the behaviour when creating a notification with a long subject/message?

Regarding the docs, because a lot of the functionality of this app is basically just forwarding requests to Nextcloud's server API, many limits and constraints are not actually controlled by the app itself. Similarly the values themselves are of course subject to change outside of the scope of this project as well.
What I would prefer to do is to link to relevant documentation from Nextcloud themselves, but in this case even Nextcloud's own documentation is lacking.

@EnriqSSSS
Copy link
Author

EnriqSSSS commented Jul 16, 2024

Basically both the subject and the message parameters on the notify function have a 64 characters size limit (including '\0').

Which means that if you are trying to let's say: Send the name of a file in a notification, most of the time would work, but in the edge cases where the file name has more than 64, them the function wouldn't work, without any warning or errors.

And yes, i noticed that this is just the default behaviour on nextcloud API. Something similar happened with this guy with onlyoffice plugin:

Https://github.com/ONLYOFFICE/onlyoffice-nextcloud/issues/732

And you are right nextcloud documentation also isn't that great.

@Raudius
Copy link
Owner

Raudius commented Jul 16, 2024

Cool, I will make sure to include a note in the docs of that function for a future release.

Maybe I'll try digging upstream on Nextcloud's repo to see if there is a reason for this limit or if it can be relaxed.

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

No branches or pull requests

2 participants