diff options
author | Alex Chen <Cnly@users.noreply.github.com> | 2019-08-16 01:45:11 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-16 01:45:11 +0800 |
commit | d63d2a50cdce891e6d4159919b304ce0c66ac0c5 (patch) | |
tree | 3108ee662fce3fd55b81eefb941049d25b8ce546 /clientapi/routing | |
parent | d21a2fb152143b2ce7600213abe18013519ccedf (diff) |
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.
Diffstat (limited to 'clientapi/routing')
-rw-r--r-- | clientapi/routing/createroom.go | 6 | ||||
-rw-r--r-- | clientapi/routing/membership.go | 2 | ||||
-rw-r--r-- | clientapi/routing/profile.go | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/clientapi/routing/createroom.go b/clientapi/routing/createroom.go index 4a76e1b0..620246d2 100644 --- a/clientapi/routing/createroom.go +++ b/clientapi/routing/createroom.go @@ -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 { diff --git a/clientapi/routing/membership.go b/clientapi/routing/membership.go index 5e183fa0..c71ac2de 100644 --- a/clientapi/routing/membership.go +++ b/clientapi/routing/membership.go @@ -144,7 +144,7 @@ func buildMembershipEvent( membership = gomatrixserverlib.Leave } - content := common.MemberContent{ + content := gomatrixserverlib.MemberContent{ Membership: membership, DisplayName: profile.DisplayName, AvatarURL: profile.AvatarURL, diff --git a/clientapi/routing/profile.go b/clientapi/routing/profile.go index e8ea6cf1..a87c6f74 100644 --- a/clientapi/routing/profile.go +++ b/clientapi/routing/profile.go @@ -332,7 +332,7 @@ func buildMembershipEvents( StateKey: &userID, } - content := common.MemberContent{ + content := gomatrixserverlib.MemberContent{ Membership: gomatrixserverlib.Join, } |