mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-26 23:25:20 +03:00
Fix to check value for "recording"
with this fix it's also not necessary to check for HPB in the app. The "recording" value from capabilities is set accordingly on server side. Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
parent
fba04620e1
commit
401bb6e2cf
2 changed files with 7 additions and 4 deletions
|
@ -2969,8 +2969,7 @@ public class CallActivity extends CallBaseActivity {
|
|||
}
|
||||
|
||||
public boolean isAllowedToStartOrStopRecording() {
|
||||
return CapabilitiesUtilNew.hasSpreedFeatureCapability(conversationUser, "recording-v1") &&
|
||||
CapabilitiesUtilNew.isCallRecordingAvailable(conversationUser)
|
||||
return CapabilitiesUtilNew.isCallRecordingAvailable(conversationUser)
|
||||
&& isModerator;
|
||||
}
|
||||
|
||||
|
|
|
@ -100,9 +100,13 @@ object CapabilitiesUtilNew {
|
|||
|
||||
@JvmStatic
|
||||
fun isCallRecordingAvailable(user: User): Boolean {
|
||||
if (user.capabilities?.spreedCapability?.config?.containsKey("call") == true) {
|
||||
if (hasSpreedFeatureCapability(user, "recording-v1") &&
|
||||
user.capabilities?.spreedCapability?.config?.containsKey("call") == true
|
||||
) {
|
||||
val map: Map<String, String>? = user.capabilities!!.spreedCapability!!.config!!["call"]
|
||||
return map != null && map.containsKey("recording")
|
||||
if (map != null && map.containsKey("recording")) {
|
||||
return map["recording"].toBoolean()
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue