Skip to content

Commit

Permalink
Merge pull request #227 from nextcloud/backport/226/stable-1.2.x
Browse files Browse the repository at this point in the history
[stable-1.2.x] Make talk optional
  • Loading branch information
tobiasKaminsky authored Jan 17, 2019
2 parents c884d1f + a5d4f54 commit dfcbab6
Showing 1 changed file with 16 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,12 +146,26 @@ protected RemoteOperationResult run(OwnCloudClient client) {
JSONArray respExactUsers = respExact.getJSONArray(NODE_USERS);
JSONArray respExactGroups = respExact.getJSONArray(NODE_GROUPS);
JSONArray respExactRemotes = respExact.getJSONArray(NODE_REMOTES);
JSONArray respExactRooms = respExact.getJSONArray(NODE_ROOMS);

JSONArray respExactRooms;
if (respExact.has(NODE_ROOMS)) {
respExactRooms = respExact.getJSONArray(NODE_ROOMS);
} else {
respExactRooms = new JSONArray();
}
JSONArray respExactEmails = respExact.getJSONArray(NODE_EMAILS);
JSONArray respPartialUsers = respData.getJSONArray(NODE_USERS);
JSONArray respPartialGroups = respData.getJSONArray(NODE_GROUPS);
JSONArray respPartialRemotes = respData.getJSONArray(NODE_REMOTES);
JSONArray respPartialRooms = respData.getJSONArray(NODE_ROOMS);

JSONArray respPartialRooms;

if (respData.has(NODE_ROOMS)) {
respPartialRooms = respData.getJSONArray(NODE_ROOMS);
} else {
respPartialRooms = new JSONArray();
}

JSONArray[] jsonResults = {
respExactUsers,
respExactGroups,
Expand Down

0 comments on commit dfcbab6

Please sign in to comment.