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
fix(autocomplete): Fix missing user status on autocomplete endpoint #40660
fix(autocomplete): Fix missing user status on autocomplete endpoint #40660
Conversation
So it can be a string that is just the same object in JSON? I still can't make sense of this API |
No, it's a empty-string or an array as per OpenAPI doc block. The JSON object is just used in Integration tests, because Behat can not handle nested arrays in TableNodes, so I json-encode the status array there |
I see, but why the empty string instead of just null? This makes the API way more complex than it needs to be (although this is probably just for historical reasons). |
Because it was empty string since adding the values back in 2021 and yes I might have made a mistake there. But now clients could rely on it.
🤷🏼 |
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.
63fc3cb
to
0e5fdbd
Compare
Signed-off-by: Joas Schilling <coding@schilljs.com>
0e5fdbd
to
a7018bc
Compare
Summary
Regression from 1be8362#diff-8a51ce62a02e28659acaa3f84252600107a22d2eb093d950f2c9c16fe6b96c8e
It seems the "empty string" default had confused @provokateurin but the status value was actually always an array, as per:
server/lib/private/Collaboration/Collaborators/UserPlugin.php
Lines 155 to 162 in 6427863
I now added an integration test to confirm it's working and stays working. I left the default/empty value untouched as empty string and basically restored the array data when a status is present.
Checklist