import timber and use .roomService()

This commit is contained in:
chagai95 2022-05-20 15:52:43 +02:00 committed by GitHub
parent f90078c593
commit f949c517b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -23,6 +23,7 @@ import im.vector.app.features.call.webrtc.WebRtcCallManager
import im.vector.app.features.createdirect.DirectRoomHelper import im.vector.app.features.createdirect.DirectRoomHelper
import org.matrix.android.sdk.api.session.Session import org.matrix.android.sdk.api.session.Session
import javax.inject.Inject import javax.inject.Inject
import timber.log.Timber
class DialPadLookup @Inject constructor( class DialPadLookup @Inject constructor(
private val session: Session, private val session: Session,
@ -47,7 +48,7 @@ class DialPadLookup @Inject constructor(
if (nativeUserId == session.myUserId) { if (nativeUserId == session.myUserId) {
throw Failure.NumberIsYours throw Failure.NumberIsYours
} }
var nativeRoomId = session.getExistingDirectRoomWithUser(nativeUserId) var nativeRoomId = session.roomService().getExistingDirectRoomWithUser(nativeUserId)
if (nativeRoomId == null) { if (nativeRoomId == null) {
// if there is no existing native room with the existing native user, // if there is no existing native room with the existing native user,
// just create a DM with the native user // just create a DM with the native user