aboutsummaryrefslogtreecommitdiff
path: root/roomserver
diff options
context:
space:
mode:
authorTill <2353100+S7evinK@users.noreply.github.com>2024-02-13 19:28:52 +0100
committerGitHub <noreply@github.com>2024-02-13 19:28:52 +0100
commite9deb5244edd4827234622ea0d3b11678a33b0ac (patch)
tree8b5d4bc7da6b305ef506b85fbe1ac2a99f3dd1dd /roomserver
parentbe0c27e68865f031e59a091fcec5244a7b48da44 (diff)
Fix `/createRoom` and `/invite` containing displayname/avatarURL of inviter (#3326)
Fixes #3324
Diffstat (limited to 'roomserver')
-rw-r--r--roomserver/api/perform.go18
-rw-r--r--roomserver/internal/perform/perform_create_room.go18
-rw-r--r--roomserver/internal/perform/perform_invite.go8
3 files changed, 19 insertions, 25 deletions
diff --git a/roomserver/api/perform.go b/roomserver/api/perform.go
index 9e00da2c..d6caec08 100644
--- a/roomserver/api/perform.go
+++ b/roomserver/api/perform.go
@@ -50,16 +50,14 @@ type PerformLeaveResponse struct {
}
type InviteInput struct {
- RoomID spec.RoomID
- Inviter spec.UserID
- Invitee spec.UserID
- DisplayName string
- AvatarURL string
- Reason string
- IsDirect bool
- KeyID gomatrixserverlib.KeyID
- PrivateKey ed25519.PrivateKey
- EventTime time.Time
+ RoomID spec.RoomID
+ Inviter spec.UserID
+ Invitee spec.UserID
+ Reason string
+ IsDirect bool
+ KeyID gomatrixserverlib.KeyID
+ PrivateKey ed25519.PrivateKey
+ EventTime time.Time
}
type PerformInviteRequest struct {
diff --git a/roomserver/internal/perform/perform_create_room.go b/roomserver/internal/perform/perform_create_room.go
index eb8de781..093082f9 100644
--- a/roomserver/internal/perform/perform_create_room.go
+++ b/roomserver/internal/perform/perform_create_room.go
@@ -503,16 +503,14 @@ func (c *Creator) PerformCreateRoom(ctx context.Context, userID spec.UserID, roo
err = c.RSAPI.PerformInvite(ctx, &api.PerformInviteRequest{
InviteInput: api.InviteInput{
- RoomID: roomID,
- Inviter: userID,
- Invitee: *inviteeUserID,
- DisplayName: createRequest.UserDisplayName,
- AvatarURL: createRequest.UserAvatarURL,
- Reason: "",
- IsDirect: createRequest.IsDirect,
- KeyID: createRequest.KeyID,
- PrivateKey: createRequest.PrivateKey,
- EventTime: createRequest.EventTime,
+ RoomID: roomID,
+ Inviter: userID,
+ Invitee: *inviteeUserID,
+ Reason: "",
+ IsDirect: createRequest.IsDirect,
+ KeyID: createRequest.KeyID,
+ PrivateKey: createRequest.PrivateKey,
+ EventTime: createRequest.EventTime,
},
InviteRoomState: globalStrippedState,
SendAsServer: string(userID.Domain()),
diff --git a/roomserver/internal/perform/perform_invite.go b/roomserver/internal/perform/perform_invite.go
index 3abb69cb..86563e8c 100644
--- a/roomserver/internal/perform/perform_invite.go
+++ b/roomserver/internal/perform/perform_invite.go
@@ -144,11 +144,9 @@ func (r *Inviter) PerformInvite(
}
content := gomatrixserverlib.MemberContent{
- Membership: spec.Invite,
- DisplayName: req.InviteInput.DisplayName,
- AvatarURL: req.InviteInput.AvatarURL,
- Reason: req.InviteInput.Reason,
- IsDirect: req.InviteInput.IsDirect,
+ Membership: spec.Invite,
+ Reason: req.InviteInput.Reason,
+ IsDirect: req.InviteInput.IsDirect,
}
if err = proto.SetContent(content); err != nil {