mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-03 12:54:53 -04:00
Strip "join_authorised_via_users_server" from join events which do not need it. (#10933)
This fixes a "Event not signed by authorising server" error when transition room member from join -> join, e.g. when updating a display name or avatar URL for restricted rooms.
This commit is contained in:
parent
7d84d2523a
commit
d1bf5f7c9d
11 changed files with 46 additions and 25 deletions
|
@ -12,6 +12,7 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from synapse.api.constants import EventContentFields
|
||||
from synapse.api.room_versions import RoomVersions
|
||||
from synapse.events import make_event_from_dict
|
||||
from synapse.events.utils import (
|
||||
|
@ -352,7 +353,7 @@ class PruneEventTestCase(unittest.TestCase):
|
|||
"event_id": "$test:domain",
|
||||
"content": {
|
||||
"membership": "join",
|
||||
"join_authorised_via_users_server": "@user:domain",
|
||||
EventContentFields.AUTHORISING_USER: "@user:domain",
|
||||
"other_key": "stripped",
|
||||
},
|
||||
},
|
||||
|
@ -372,7 +373,7 @@ class PruneEventTestCase(unittest.TestCase):
|
|||
"type": "m.room.member",
|
||||
"content": {
|
||||
"membership": "join",
|
||||
"join_authorised_via_users_server": "@user:domain",
|
||||
EventContentFields.AUTHORISING_USER: "@user:domain",
|
||||
"other_key": "stripped",
|
||||
},
|
||||
},
|
||||
|
@ -380,7 +381,7 @@ class PruneEventTestCase(unittest.TestCase):
|
|||
"type": "m.room.member",
|
||||
"content": {
|
||||
"membership": "join",
|
||||
"join_authorised_via_users_server": "@user:domain",
|
||||
EventContentFields.AUTHORISING_USER: "@user:domain",
|
||||
},
|
||||
"signatures": {},
|
||||
"unsigned": {},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue