Skip to content
Snippets Groups Projects
Commit 5cdcda88 authored by Bradley Hilton's avatar Bradley Hilton Committed by Rodrigo Nascimento
Browse files

Remove the developer warning on the rest api (#10441)

parent b703b94f
No related branches found
No related tags found
No related merge requests found
......@@ -146,20 +146,7 @@ class API extends Restivus {
return RocketChat.API.v1.failure(e.message, e.error);
}
result = result ? result : RocketChat.API.v1.success();
if (
/(channels|groups)\./.test(route)
&& result
&& result.body
&& result.body.success === true
&& (result.body.channel || result.body.channels || result.body.group || result.body.groups)
) {
// TODO: Remove this after three versions have been released. That means at 0.64 this should be gone. ;)
result.body.developerWarning = '[WARNING]: The "usernames" field has been removed for performance reasons. Please use the "*.members" endpoint to get a list of members/users in a room.';
}
return result;
return result ? result : RocketChat.API.v1.success();
};
for (const [name, helperMethod] of this.getHelperMethods()) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment