Skip to content

Commit

Permalink
Merge pull request #4229 from nextcloud/backport/4223/stable-20.0
Browse files Browse the repository at this point in the history
[stable-20.0] fix to load chat for old server version
  • Loading branch information
mahibi authored Sep 17, 2024
2 parents 05c6dc3 + 5692212 commit 1e5df50
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1744,7 +1744,9 @@ class CallActivity : CallBaseActivity() {
}

private fun startCallTimeCounter(callStartTime: Long?) {
if (callStartTime != null && hasSpreedFeatureCapability(
if (callStartTime != null &&
callStartTime != 0L &&
hasSpreedFeatureCapability(
conversationUser!!.capabilities!!.spreedCapability!!, SpreedFeatures.RECORDING_V1
)
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,16 +144,16 @@ data class Conversation(
var callRecording: Int = 0,

@JsonField(name = ["avatarVersion"])
var avatarVersion: String? = null,
var avatarVersion: String? = "",

// Be aware that variables with "is" at the beginning will lead to the error:
// "@JsonField annotation can only be used on private fields if both getter and setter are present."
// Instead, name it with "has" at the beginning: isCustomAvatar -> hasCustomAvatar
@JsonField(name = ["isCustomAvatar"])
var hasCustomAvatar: Boolean? = null,
var hasCustomAvatar: Boolean? = false,

@JsonField(name = ["callStartTime"])
var callStartTime: Long? = null,
var callStartTime: Long? = 0L,

@JsonField(name = ["recordingConsent"])
var recordingConsentRequired: Int = 0,
Expand Down

0 comments on commit 1e5df50

Please sign in to comment.