Follow permalinks to and from threads (#5414)

* Implement navigation to event inside a thread when a permalink is used

* Fix permalink navigation in threads to rooms

* Fix navigating to a different thread from a permalink in an existing thread

* Fix tests

* Add missing tests for thread navigation

* Reduce number of diff between ThreadedMessagesNode.kt and MessagesNode.kt

* Navigate back to the room when a link to the current room is clicked in a thread.

---------

Co-authored-by: Benoit Marty <benoitm@element.io>
Co-authored-by: Benoit Marty <benoit@matrix.org>
This commit is contained in:
Jorge Martin Espinosa 2025-09-30 11:18:13 +02:00 committed by GitHub
parent 43ad8743b8
commit 72c766d73a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 397 additions and 76 deletions

View file

@ -322,4 +322,12 @@ class RustBaseRoom(
})
}
}
override suspend fun threadRootIdForEvent(eventId: EventId): Result<ThreadId?> = withContext(roomDispatcher) {
runCatchingExceptions {
innerRoom.loadOrFetchEvent(eventId.value).use {
it.threadRootEventId()?.let(::ThreadId)
}
}
}
}