diff --git a/CHANGES.md b/CHANGES.md index a40203a588..d4cf3f7ef0 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -8,7 +8,7 @@ Improvements 🙌: - Bugfix 🐛: - - + - Video calls are shown as a voice ones in the timeline (#1676) Translations 🗣: - diff --git a/matrix-sdk-android/src/main/java/im/vector/matrix/android/api/session/room/model/call/CallInviteContent.kt b/matrix-sdk-android/src/main/java/im/vector/matrix/android/api/session/room/model/call/CallInviteContent.kt index 1fad181fab..b165575ba0 100644 --- a/matrix-sdk-android/src/main/java/im/vector/matrix/android/api/session/room/model/call/CallInviteContent.kt +++ b/matrix-sdk-android/src/main/java/im/vector/matrix/android/api/session/room/model/call/CallInviteContent.kt @@ -59,5 +59,5 @@ data class CallInviteContent( } } - fun isVideo(): Boolean = offer?.sdp?.contains(Offer.SDP_VIDEO) == true + fun isVideo() = offer?.sdp?.contains(Offer.SDP_VIDEO) == true } diff --git a/vector/src/main/java/im/vector/riotx/features/home/room/detail/timeline/format/NoticeEventFormatter.kt b/vector/src/main/java/im/vector/riotx/features/home/room/detail/timeline/format/NoticeEventFormatter.kt index 032ad4fb62..090e2dda3f 100644 --- a/vector/src/main/java/im/vector/riotx/features/home/room/detail/timeline/format/NoticeEventFormatter.kt +++ b/vector/src/main/java/im/vector/riotx/features/home/room/detail/timeline/format/NoticeEventFormatter.kt @@ -286,7 +286,7 @@ class NoticeEventFormatter @Inject constructor(private val activeSessionDataSour return when (type) { EventType.CALL_INVITE -> { val content = event.getClearContent().toModel() ?: return null - val isVideoCall = content.offer?.sdp == CallInviteContent.Offer.SDP_VIDEO + val isVideoCall = content.isVideo() return if (isVideoCall) { if (event.isSentByCurrentUser()) { sp.getString(R.string.notice_placed_video_call_by_you)