Skip to content

Commit

Permalink
Add room version 10 support (#315)
Browse files Browse the repository at this point in the history
* Add room version 10 support

* Mark it as stable
  • Loading branch information
neilalexander authored May 30, 2022
1 parent dcfbb70 commit 3a4b148
Showing 1 changed file with 24 additions and 9 deletions.
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

0 comments on commit 3a4b148

Please sign in to comment.