mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-08-01 05:42:46 +00:00
Replace event content types with ones in gomatrixserverlib (#785)
The types that are not in gomatrixserverlib are not replaced. This also updates the gomatrixserverlib dependency.
This commit is contained in:
parent
d21a2fb152
commit
d63d2a50cd
8 changed files with 33 additions and 105 deletions
|
@ -106,7 +106,7 @@ func (r createRoomRequest) Validate() *util.JSONResponse {
|
|||
}
|
||||
}
|
||||
|
||||
var CreationContent common.CreateContent
|
||||
var CreationContent gomatrixserverlib.CreateContent
|
||||
err = json.Unmarshal(creationContentBytes, &CreationContent)
|
||||
if err != nil {
|
||||
return &util.JSONResponse{
|
||||
|
@ -196,7 +196,7 @@ func createRoom(
|
|||
return httputil.LogThenError(req, err)
|
||||
}
|
||||
|
||||
membershipContent := common.MemberContent{
|
||||
membershipContent := gomatrixserverlib.MemberContent{
|
||||
Membership: gomatrixserverlib.Join,
|
||||
DisplayName: profile.DisplayName,
|
||||
AvatarURL: profile.AvatarURL,
|
||||
|
@ -246,7 +246,7 @@ func createRoom(
|
|||
{"m.room.member", userID, membershipContent},
|
||||
{"m.room.power_levels", "", common.InitialPowerLevelsContent(userID)},
|
||||
// TODO: m.room.canonical_alias
|
||||
{"m.room.join_rules", "", common.JoinRulesContent{JoinRule: joinRules}},
|
||||
{"m.room.join_rules", "", gomatrixserverlib.JoinRuleContent{JoinRule: joinRules}},
|
||||
{"m.room.history_visibility", "", common.HistoryVisibilityContent{HistoryVisibility: historyVisibility}},
|
||||
}
|
||||
if r.GuestCanJoin {
|
||||
|
|
|
@ -144,7 +144,7 @@ func buildMembershipEvent(
|
|||
membership = gomatrixserverlib.Leave
|
||||
}
|
||||
|
||||
content := common.MemberContent{
|
||||
content := gomatrixserverlib.MemberContent{
|
||||
Membership: membership,
|
||||
DisplayName: profile.DisplayName,
|
||||
AvatarURL: profile.AvatarURL,
|
||||
|
|
|
@ -332,7 +332,7 @@ func buildMembershipEvents(
|
|||
StateKey: &userID,
|
||||
}
|
||||
|
||||
content := common.MemberContent{
|
||||
content := gomatrixserverlib.MemberContent{
|
||||
Membership: gomatrixserverlib.Join,
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue