This repository has been archived by the owner on Nov 25, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 678
Add possibility to fix the room state using resolve-state
#3249
Closed
Conversation
This file contains 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
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #3249 +/- ##
==========================================
- Coverage 65.50% 65.44% -0.07%
==========================================
Files 507 507
Lines 57291 57223 -68
==========================================
- Hits 37531 37449 -82
- Misses 15914 15924 +10
- Partials 3846 3850 +4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Example output: $ go run ./cmd/resolve-state/main.go -room_id '!OGEhHVWSdvArJzumhm:matrix.org' -filtertype 'm.room.name' -fix
Opening database
Room version 5
Fetching 359 snapshot NIDs
358 of 359
Fetching 108480 state events
Fetching 67885 auth events
Resolving state
Resolved state contains 102535 events
* $cmfAyePJH4n7AnzWDGlJyS6g3RRkNDOGBTtbnTrWgzs m.room.name ""
{"name":"Matrix HQ"}
Returned 1 state events after filtering
!!! WARNING !!!
Attempting to fix the state of a room can make things even worse.
For the best result, please shut down Dendrite to avoid concurrent database changes.
If you have missing state events (e.g. users not in a room, missing power levels
make sure they would be added by checking the resolved state events above first (or by running without -fix).
If you are sure everything looks fine, press Return, if not, press CTRL+c.
Attempting to fix state
Successfully set new snapshot NID 216980 containing 102535 state events |
…e into s7evink/resolve-state
Tried to fix the state for #dendrite with this, managed to get myself reset out of the room 🙃 |
Closing this for now, not working as intended. May revisit later. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This adds a
room_id
and afix
flag toresolve-state
.When using
room_id
,resolve-state
will ignore all snapshot NIDs passed to it and use all existing snapshots NIDs stored in the database to resolve the current state of a room.If passed the
fix
flag, it will create a new snapshot containing the resolved state. (only after confirming the user knows what they are doing)