mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-03-31 14:04:27 -05:00
Remove creator from create content
This commit is contained in:
parent
83f6fc6578
commit
009095abd8
|
@ -90,7 +90,16 @@ func (c *Creator) PerformCreateRoom(ctx context.Context, userID spec.UserID, roo
|
||||||
} else {
|
} else {
|
||||||
senderID = spec.SenderID(userID.String())
|
senderID = spec.SenderID(userID.String())
|
||||||
}
|
}
|
||||||
createContent["creator"] = senderID
|
|
||||||
|
// TODO: Maybe, at some point, GMSL should return the events to create, so we can define the version
|
||||||
|
// entirely there.
|
||||||
|
switch createRequest.RoomVersion {
|
||||||
|
case gomatrixserverlib.RoomVersionV11:
|
||||||
|
// RoomVersionV11 removed the creator field from the create content: https://github.com/matrix-org/matrix-spec-proposals/pull/2175
|
||||||
|
default:
|
||||||
|
createContent["creator"] = senderID
|
||||||
|
}
|
||||||
|
|
||||||
createContent["room_version"] = createRequest.RoomVersion
|
createContent["room_version"] = createRequest.RoomVersion
|
||||||
powerLevelContent := eventutil.InitialPowerLevelsContent(string(senderID))
|
powerLevelContent := eventutil.InitialPowerLevelsContent(string(senderID))
|
||||||
joinRuleContent := gomatrixserverlib.JoinRuleContent{
|
joinRuleContent := gomatrixserverlib.JoinRuleContent{
|
||||||
|
|
Loading…
Reference in a new issue