Use session.getRoom(roomId)

This commit is contained in:
Florian Renaud 2022-10-05 00:01:04 +02:00
parent 521af70988
commit 30f33d36de
4 changed files with 8 additions and 4 deletions

View File

@ -23,6 +23,7 @@ import im.vector.app.features.voicebroadcast.model.asVoiceBroadcastEvent
import org.matrix.android.sdk.api.query.QueryStringValue
import org.matrix.android.sdk.api.session.Session
import org.matrix.android.sdk.api.session.events.model.toContent
import org.matrix.android.sdk.api.session.getRoom
import org.matrix.android.sdk.api.session.room.Room
import org.matrix.android.sdk.api.session.room.model.relation.RelationDefaultContent
import timber.log.Timber
@ -33,7 +34,7 @@ class PauseVoiceBroadcastUseCase @Inject constructor(
) {
suspend fun execute(roomId: String) {
val room = session.roomService().getRoom(roomId) ?: return
val room = session.getRoom(roomId) ?: return
Timber.d("## PauseVoiceBroadcastUseCase: Pause voice broadcast requested")

View File

@ -23,6 +23,7 @@ import im.vector.app.features.voicebroadcast.model.asVoiceBroadcastEvent
import org.matrix.android.sdk.api.query.QueryStringValue
import org.matrix.android.sdk.api.session.Session
import org.matrix.android.sdk.api.session.events.model.toContent
import org.matrix.android.sdk.api.session.getRoom
import org.matrix.android.sdk.api.session.room.Room
import org.matrix.android.sdk.api.session.room.model.relation.RelationDefaultContent
import timber.log.Timber
@ -33,7 +34,7 @@ class ResumeVoiceBroadcastUseCase @Inject constructor(
) {
suspend fun execute(roomId: String) {
val room = session.roomService().getRoom(roomId) ?: return
val room = session.getRoom(roomId) ?: return
Timber.d("## ResumeVoiceBroadcastUseCase: Resume voice broadcast requested")

View File

@ -23,6 +23,7 @@ import im.vector.app.features.voicebroadcast.model.asVoiceBroadcastEvent
import org.matrix.android.sdk.api.query.QueryStringValue
import org.matrix.android.sdk.api.session.Session
import org.matrix.android.sdk.api.session.events.model.toContent
import org.matrix.android.sdk.api.session.getRoom
import org.matrix.android.sdk.api.session.room.Room
import timber.log.Timber
import javax.inject.Inject
@ -32,7 +33,7 @@ class StartVoiceBroadcastUseCase @Inject constructor(
) {
suspend fun execute(roomId: String) {
val room = session.roomService().getRoom(roomId) ?: return
val room = session.getRoom(roomId) ?: return
Timber.d("## StartVoiceBroadcastUseCase: Start voice broadcast requested")

View File

@ -23,6 +23,7 @@ import im.vector.app.features.voicebroadcast.model.asVoiceBroadcastEvent
import org.matrix.android.sdk.api.query.QueryStringValue
import org.matrix.android.sdk.api.session.Session
import org.matrix.android.sdk.api.session.events.model.toContent
import org.matrix.android.sdk.api.session.getRoom
import org.matrix.android.sdk.api.session.room.Room
import org.matrix.android.sdk.api.session.room.model.relation.RelationDefaultContent
import timber.log.Timber
@ -33,7 +34,7 @@ class StopVoiceBroadcastUseCase @Inject constructor(
) {
suspend fun execute(roomId: String) {
val room = session.roomService().getRoom(roomId) ?: return
val room = session.getRoom(roomId) ?: return
Timber.d("## StopVoiceBroadcastUseCase: Stop voice broadcast requested")