Skip to content

Commit

Permalink
Introduce drop-account capability
Browse files Browse the repository at this point in the history
Signed-off-by: ZetaTom <70907959+ZetaTom@users.noreply.github.com>
  • Loading branch information
ZetaTom committed Oct 9, 2023
1 parent c870630 commit 400ca36
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,9 @@ public class GetCapabilitiesRemoteOperation extends RemoteOperation {
// end to end encryption
private static final String PROPERTY_KEYS_EXIST = "keys-exist";

// drop-account
private static final String NODE_DROP_ACCOUNT = "drop-account";


private OCCapability currentCapability = null;

Expand Down Expand Up @@ -673,6 +676,17 @@ private OCCapability parseResponse(String response) throws JSONException {
} else {
capability.setGroupfolders(CapabilityBooleanType.FALSE);
}

// drop-account
if (respCapabilities.has(NODE_DROP_ACCOUNT)) {
JSONObject dropAccountCapability = respCapabilities.getJSONObject(NODE_DROP_ACCOUNT);

if (dropAccountCapability.getBoolean(PROPERTY_ENABLED)) {
capability.setDropAccount(CapabilityBooleanType.TRUE);
} else {
capability.setDropAccount(CapabilityBooleanType.FALSE);
}
}
}

Log_OC.d(TAG, "*** Get Capabilities completed ");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@ class OCCapability {
// Groupfolders
var groupfolders = CapabilityBooleanType.UNKNOWN

// Drop-Account
var dropAccount = CapabilityBooleanType.UNKNOWN

// Etag for capabilities
var etag: String? = ""

Expand Down

0 comments on commit 400ca36

Please sign in to comment.