File tree Expand file tree Collapse file tree
library/src/main/java/com/owncloud/android/lib/resources/status Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -163,7 +163,10 @@ public class GetCapabilitiesRemoteOperation extends RemoteOperation<OCCapability
163163
164164 //recommendations
165165 private static final String NODE_RECOMMENDATIONS = "recommendations" ;
166-
166+
167+ // sharing
168+ private static final String NODE_SHARING = "sharing" ;
169+
167170 // needed for checking compatible filenames
168171 private static final String FORBIDDEN_FILENAME_CHARACTERS = "forbidden_filename_characters" ;
169172 private static final String FORBIDDEN_FILENAMES = "forbidden_filenames" ;
@@ -800,6 +803,11 @@ private OCCapability parseResponse(String response) throws JSONException {
800803 capability .setRecommendations (CapabilityBooleanType .FALSE );
801804 }
802805
806+ if (respCapabilities .has (NODE_SHARING )) {
807+ JSONObject sharingCapability = respCapabilities .getJSONObject (NODE_SHARING );
808+ capability .setSharingJson (sharingCapability .toString ());
809+ }
810+
803811 // notes folder
804812 if (respCapabilities .has (NODE_NOTES )) {
805813 JSONObject notesCapability = respCapabilities .getJSONObject (NODE_NOTES );
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ import com.google.gson.Gson
1313import com.google.gson.reflect.TypeToken
1414import com.nextcloud.android.lib.resources.clientintegration.App
1515import com.nextcloud.android.lib.resources.clientintegration.Endpoint
16+ import kotlinx.serialization.json.Json
1617
1718/* *
1819 * Contains data of the Capabilities for an account, from the Capabilities API
@@ -130,6 +131,8 @@ class OCCapability {
130131 // client integration
131132 var clientIntegrationJson: String? = null
132133
134+ var sharingJson: String? = null
135+
133136 fun getClientIntegrationEndpoints (
134137 hook : Type ,
135138 mimetype : String
You can’t perform that action at this time.
0 commit comments