mirror of
https://github.com/nextcloud/talk-android
synced 2025-07-09 13:59:48 +01:00
add different room types and their retention
Signed-off-by: sowjanyakch <sowjanya.kch@gmail.com>
This commit is contained in:
parent
ccb2fcfcad
commit
7a4c98db01
@ -44,6 +44,8 @@ class ConversationEnums {
|
|||||||
SHARE_PASSWORD,
|
SHARE_PASSWORD,
|
||||||
FILE,
|
FILE,
|
||||||
ROOM,
|
ROOM,
|
||||||
EVENT
|
EVENT,
|
||||||
|
PHONE,
|
||||||
|
INSTANT_MEETING
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,6 +16,8 @@ class ConversationObjectTypeConverter : StringBasedTypeConverter<ConversationEnu
|
|||||||
"room" -> ConversationEnums.ObjectType.ROOM
|
"room" -> ConversationEnums.ObjectType.ROOM
|
||||||
"file" -> ConversationEnums.ObjectType.FILE
|
"file" -> ConversationEnums.ObjectType.FILE
|
||||||
"event" -> ConversationEnums.ObjectType.EVENT
|
"event" -> ConversationEnums.ObjectType.EVENT
|
||||||
|
"phone" -> ConversationEnums.ObjectType.PHONE
|
||||||
|
"instant_meeting" -> ConversationEnums.ObjectType.INSTANT_MEETING
|
||||||
else -> ConversationEnums.ObjectType.DEFAULT
|
else -> ConversationEnums.ObjectType.DEFAULT
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -30,6 +32,8 @@ class ConversationObjectTypeConverter : StringBasedTypeConverter<ConversationEnu
|
|||||||
ConversationEnums.ObjectType.ROOM -> "room"
|
ConversationEnums.ObjectType.ROOM -> "room"
|
||||||
ConversationEnums.ObjectType.FILE -> "file"
|
ConversationEnums.ObjectType.FILE -> "file"
|
||||||
ConversationEnums.ObjectType.EVENT -> "event"
|
ConversationEnums.ObjectType.EVENT -> "event"
|
||||||
|
ConversationEnums.ObjectType.PHONE -> "phone"
|
||||||
|
ConversationEnums.ObjectType.INSTANT_MEETING -> "instant_meeting"
|
||||||
else -> ""
|
else -> ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -140,6 +140,36 @@ object CapabilitiesUtil {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun retentionOfEventRooms(spreedCapabilities: SpreedCapability): Int {
|
||||||
|
if (spreedCapabilities.config?.containsKey("conversations") == true) {
|
||||||
|
val map = spreedCapabilities.config!!["conversations"]
|
||||||
|
if (map?.containsKey("retention-event") == true) {
|
||||||
|
return map["retention-event"].toString().toInt()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
fun retentionOfSIP(spreedCapabilities: SpreedCapability): Int {
|
||||||
|
if (spreedCapabilities.config?.containsKey("conversations") == true) {
|
||||||
|
val map = spreedCapabilities.config!!["conversations"]
|
||||||
|
if (map?.containsKey("retention-phone") == true) {
|
||||||
|
return map["retention-phone"].toString().toInt()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
fun retentionOfInstantMeetings(spreedCapabilities: SpreedCapability): Int {
|
||||||
|
if (spreedCapabilities.config?.containsKey("conversations") == true) {
|
||||||
|
val map = spreedCapabilities.config!!["conversations"]
|
||||||
|
if (map?.containsKey("retention-instant-meetings") == true) {
|
||||||
|
return map["retention-instant-meetings"].toString().toInt()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
fun isCallRecordingAvailable(spreedCapabilities: SpreedCapability): Boolean {
|
fun isCallRecordingAvailable(spreedCapabilities: SpreedCapability): Boolean {
|
||||||
if (hasSpreedFeatureCapability(spreedCapabilities, SpreedFeatures.RECORDING_V1) &&
|
if (hasSpreedFeatureCapability(spreedCapabilities, SpreedFeatures.RECORDING_V1) &&
|
||||||
|
Loading…
Reference in New Issue
Block a user