This repository was archived by the owner on Apr 26, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +13
-3
lines changed Expand file tree Collapse file tree 4 files changed +13
-3
lines changed Original file line number Diff line number Diff line change
1
+ Change default room version to "6" , per [MSC2788](https://github.com/matrix-org/matrix-doc/pull/2788).
Original file line number Diff line number Diff line change @@ -119,7 +119,7 @@ pid_file: DATADIR/homeserver.pid
119
119
# For example, for room version 1, default_room_version should be set
120
120
# to "1".
121
121
#
122
- # default_room_version: "5 "
122
+ # default_room_version: "6 "
123
123
124
124
# The GC threshold parameters to pass to `gc.set_threshold`, if defined
125
125
#
Original file line number Diff line number Diff line change 39
39
# in the list.
40
40
DEFAULT_BIND_ADDRESSES = ["::" , "0.0.0.0" ]
41
41
42
- DEFAULT_ROOM_VERSION = "5 "
42
+ DEFAULT_ROOM_VERSION = "6 "
43
43
44
44
ROOM_COMPLEXITY_TOO_GREAT = (
45
45
"Your homeserver is unable to join rooms this large or complex. "
Original file line number Diff line number Diff line change 21
21
from synapse .util .stringutils import random_string
22
22
23
23
from tests import unittest
24
+ from tests .unittest import override_config
24
25
25
26
26
27
class DirectoryTestCase (unittest .HomeserverTestCase ):
@@ -67,10 +68,18 @@ def test_directory_in_room_too_long(self):
67
68
self .ensure_user_joined_room ()
68
69
self .set_alias_via_directory (400 , alias_length = 256 )
69
70
70
- def test_state_event_in_room (self ):
71
+ @override_config ({"default_room_version" : 5 })
72
+ def test_state_event_user_in_v5_room (self ):
73
+ """Test that a regular user can add alias events before room v6"""
71
74
self .ensure_user_joined_room ()
72
75
self .set_alias_via_state_event (200 )
73
76
77
+ @override_config ({"default_room_version" : 6 })
78
+ def test_state_event_v6_room (self ):
79
+ """Test that a regular user can *not* add alias events from room v6"""
80
+ self .ensure_user_joined_room ()
81
+ self .set_alias_via_state_event (403 )
82
+
74
83
def test_directory_in_room (self ):
75
84
self .ensure_user_joined_room ()
76
85
self .set_alias_via_directory (200 )
You can’t perform that action at this time.
0 commit comments