Add comment to explain the replacementRoom behaviour

This commit is contained in:
Florian Renaud 2022-09-12 17:52:27 +02:00
parent e76793781d
commit 824a4bcae5

View File

@ -74,6 +74,7 @@ internal class DefaultCreateRoomFromLocalRoomTask @Inject constructor(
get() = monarchy.realmConfiguration
override suspend fun execute(params: CreateRoomFromLocalRoomTask.Params): String {
// If a room has already been created for the given local room, return the existing roomId
val replacementRoomId = stateEventDataSource.getStateEvent(params.localRoomId, EventType.STATE_ROOM_TOMBSTONE, QueryStringValue.IsEmpty)
?.content.toModel<RoomTombstoneContent>()
?.replacementRoomId