diff --git a/matrix-sdk-android/src/main/java/im/vector/matrix/android/api/session/securestorage/EncryptedSecretContent.kt b/matrix-sdk-android/src/main/java/im/vector/matrix/android/api/session/securestorage/EncryptedSecretContent.kt index 4c8b51c668..f88b39fd13 100644 --- a/matrix-sdk-android/src/main/java/im/vector/matrix/android/api/session/securestorage/EncryptedSecretContent.kt +++ b/matrix-sdk-android/src/main/java/im/vector/matrix/android/api/session/securestorage/EncryptedSecretContent.kt @@ -19,6 +19,7 @@ package im.vector.matrix.android.api.session.securestorage import com.squareup.moshi.Json import com.squareup.moshi.JsonClass import im.vector.matrix.android.internal.di.MoshiProvider +import im.vector.matrix.android.internal.session.user.accountdata.AccountDataContent /** * The account_data will have an encrypted property that is a map from key ID to an object. @@ -32,7 +33,7 @@ data class EncryptedSecretContent( @Json(name = "ciphertext") val ciphertext: String? = null, @Json(name = "mac") val mac: String? = null, @Json(name = "ephemeral") val ephemeral: String? = null -) { +) : AccountDataContent { companion object { /** * Facility method to convert from object which must be comprised of maps, lists, diff --git a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/sync/model/accountdata/UserAccountData.kt b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/sync/model/accountdata/UserAccountData.kt index 3ec6c3c7eb..c508413665 100644 --- a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/sync/model/accountdata/UserAccountData.kt +++ b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/sync/model/accountdata/UserAccountData.kt @@ -17,8 +17,9 @@ package im.vector.matrix.android.internal.session.sync.model.accountdata import com.squareup.moshi.Json +import im.vector.matrix.android.internal.session.user.accountdata.AccountDataContent -abstract class UserAccountData { +abstract class UserAccountData : AccountDataContent { @Json(name = "type") abstract val type: String diff --git a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/user/accountdata/AccountDataContent.kt b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/user/accountdata/AccountDataContent.kt new file mode 100644 index 0000000000..5335f8a7f1 --- /dev/null +++ b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/user/accountdata/AccountDataContent.kt @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2020 New Vector Ltd + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package im.vector.matrix.android.internal.session.user.accountdata + +/** + * Tag class to identify every account data content + */ +internal interface AccountDataContent