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 @@ -167,7 +167,10 @@ public class GetCapabilitiesRemoteOperation extends RemoteOperation<OCCapability
167167
168168 //recommendations
169169 private static final String NODE_RECOMMENDATIONS = "recommendations" ;
170-
170+
171+ // sharing
172+ private static final String NODE_SHARING = "sharing" ;
173+
171174 // needed for checking compatible filenames
172175 private static final String FORBIDDEN_FILENAME_CHARACTERS = "forbidden_filename_characters" ;
173176 private static final String FORBIDDEN_FILENAMES = "forbidden_filenames" ;
@@ -817,6 +820,11 @@ private OCCapability parseResponse(String response) throws JSONException {
817820 capability .setRecommendations (CapabilityBooleanType .FALSE );
818821 }
819822
823+ if (respCapabilities .has (NODE_SHARING )) {
824+ JSONObject sharingCapability = respCapabilities .getJSONObject (NODE_SHARING );
825+ capability .setSharingJson (sharingCapability .toString ());
826+ }
827+
820828 // notes folder
821829 if (respCapabilities .has (NODE_NOTES )) {
822830 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
@@ -136,6 +137,8 @@ class OCCapability {
136137 // client integration
137138 var clientIntegrationJson: String? = null
138139
140+ var sharingJson: String? = null
141+
139142 fun getClientIntegrationEndpoints (
140143 hook : Type ,
141144 mimetype : String
You can’t perform that action at this time.
0 commit comments