Delete unused methods

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
Marcel Hibbe 2023-04-26 09:52:55 +02:00
parent 1e87fe9b69
commit eab052d2ac
No known key found for this signature in database
GPG Key ID: C793F8B59F43CE7B

View File

@ -43,30 +43,9 @@ data class User(
var scheduledForDeletion: Boolean = FALSE
) : Parcelable {
fun getMaxMessageLength(): Int {
return (capabilities?.spreedCapability?.config?.get("chat")?.get("max-length") as? String)?.toInt()
?: DEFAULT_CHAT_MESSAGE_LENGTH
}
fun getAttachmentsConfig(key: String): Any? {
return capabilities?.spreedCapability?.config?.get("attachments")?.get(key)
}
fun canUserCreateGroupConversations(): Boolean {
val canCreateValue = capabilities?.spreedCapability?.config?.get("conversations")?.get("can-create") as? String
canCreateValue?.let {
return it.toBoolean()
}
return true
}
fun getCredentials(): String = ApiUtils.getCredentials(username, token)
fun hasSpreedFeatureCapability(capabilityName: String): Boolean {
return capabilities?.spreedCapability?.features?.contains(capabilityName) ?: false
}
companion object {
const val DEFAULT_CHAT_MESSAGE_LENGTH: Int = 1000
}
}