Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add room version 10 support #315

Merged
merged 2 commits into from
May 30, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 24 additions & 9 deletions eventversion.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,16 @@ type JoinRulesPermittingRestrictedJoinInEventAuth int
// allows for future expansion.
// https://matrix.org/docs/spec/#room-version-grammar
const (
RoomVersionV1 RoomVersion = "1"
RoomVersionV2 RoomVersion = "2"
RoomVersionV3 RoomVersion = "3"
RoomVersionV4 RoomVersion = "4"
RoomVersionV5 RoomVersion = "5"
RoomVersionV6 RoomVersion = "6"
RoomVersionV7 RoomVersion = "7"
RoomVersionV8 RoomVersion = "8"
RoomVersionV9 RoomVersion = "9"
RoomVersionV1 RoomVersion = "1"
RoomVersionV2 RoomVersion = "2"
RoomVersionV3 RoomVersion = "3"
RoomVersionV4 RoomVersion = "4"
RoomVersionV5 RoomVersion = "5"
RoomVersionV6 RoomVersion = "6"
RoomVersionV7 RoomVersion = "7"
RoomVersionV8 RoomVersion = "8"
RoomVersionV9 RoomVersion = "9"
RoomVersionV10 RoomVersion = "10"
)

// Event format constants.
Expand Down Expand Up @@ -208,6 +209,20 @@ var roomVersionMeta = map[RoomVersion]RoomVersionDescription{
allowRestrictedJoinsInEventAuth: RestrictedOnly,
requireIntegerPowerLevels: false,
},
RoomVersionV10: {
Supported: true,
Stable: true,
stateResAlgorithm: StateResV2,
eventFormat: EventFormatV2,
eventIDFormat: EventIDFormatV3,
redactionAlgorithm: RedactionAlgorithmV4,
enforceSignatureChecks: true,
enforceCanonicalJSON: true,
powerLevelsIncludeNotifications: true,
allowKnockingInEventAuth: KnockOrKnockRestricted,
allowRestrictedJoinsInEventAuth: RestrictedOrKnockRestricted,
requireIntegerPowerLevels: true,
},
"org.matrix.msc3667": { // based on room version 7
Supported: true,
Stable: false,
Expand Down