Merged
Conversation
...and minor refactoring around
What used to be a Thread active class is now called ThreadInfo and it's a dumb data structure. Next to it, there's ThreadInfos, which is a class where all work on creating and updating thread information occurs, consolidating (and fixing) the code that was in Room::updateThread() and Thread::addEvent(). Since ThreadInfos cannot merely update from an event - a real room is necessary - the test in testthread.cpp now creates that room and makes a thread in it. Each test function uses the same thread creation logic, put into exchangeThreadEvents(); but observes this thread from different viewpoints - as the thread participants (newThread) and as a separate room member who looks at the thread in room history (historicalThread) and in a sync (rootAlreadyThreaded). Unfortunately, rootAlreadyThreaded cannot really test the event payload as Synapse doesn't seem to aggregate the thread as expected; but the ThreadInfo can be tested.
testthread requires a Synapse container now, so instead of polluting the CI script we mark the tests in CMakeLists.txt
|
TobiasFella
approved these changes
Feb 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Most important stuff is all in 5edd135 - boiling down to the room-aware
ThreadInfosclass andThreadInfos::updateFrom()taking place of bothRoom::updateThread()andThread::addEvent(). The thread info updating code also received some shake-down - the whole refactoring started with me stumbling over a crasher when a thread is created in an encrypted room, and then I found another couple corner cases not working correctly, hopefully covered by the reworked tests.