Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[minor] Incorrect invitee displayname when inviting at room creation #3348

Closed
matrixbot opened this issue Nov 2, 2024 · 2 comments
Closed

Comments

@matrixbot
Copy link
Collaborator

This issue was originally created by @anton-molyboha at matrix-org/dendrite#3348.

Background information

  • Dendrite version or git SHA: 0.13.6
  • SQLite3 or Postgres?: Postgres
  • Running in Docker?: no
  • go version: 1.21.5
  • Client used (if applicable): curl, Element Desktop

Description

The room creation endpoint /_matrix/client/v3/createRoom accepts an optional list of accounts to invite to the newly created room.
When I invite somebody via this endpoint, their displayname shows as that of the inviter rather than invitee.

(sorry for poor wording, see "steps to reproduce" below, they are much more clear)

Steps to reproduce

  • run
curl --data '{"name": "Test room", "invite": ["@anton:rendezvous.anton.molyboha.me"]}' --header 'Authorization: Bearer <redacted>' https://rendezvous.anton.molyboha.me/_matrix/client/v3/createRoom
  • accept the invitation in Element Desktop (or another client)
  • look at the source of the invitation message. What I see is:
{
  "content": {
    "displayname": "test1",
    "membership": "invite"
  },
  "event_id": "<redacted>",
  "origin_server_ts": 1711569816249,
  "sender": "@test1:rendezvous.anton.molyboha.me",
  "state_key": "@anton:rendezvous.anton.molyboha.me",
  "type": "m.room.member",
  "unsigned": {
    "invite_room_state": [
      {
        "content": {
          "creator": "@test1:rendezvous.anton.molyboha.me",
          "room_version": "10"
        },
        "sender": "@test1:rendezvous.anton.molyboha.me",
        "state_key": "",
        "type": "m.room.create"
      },
      {
        "content": {
          "displayname": "test1",
          "membership": "join"
        },
        "sender": "@test1:rendezvous.anton.molyboha.me",
        "state_key": "@test1:rendezvous.anton.molyboha.me",
        "type": "m.room.member"
      },
      {
        "content": {
          "join_rule": "invite"
        },
        "sender": "@test1:rendezvous.anton.molyboha.me",
        "state_key": "",
        "type": "m.room.join_rules"
      },
      {
        "content": {
          "name": "Test room"
        },
        "sender": "@test1:rendezvous.anton.molyboha.me",
        "state_key": "",
        "type": "m.room.name"
      }
    ]
  },
  "room_id": "<redacted>:rendezvous.anton.molyboha.me"
}

Notice "displayname": "test1" part. The actual displayname for @anton:rendezvous.anton.molyboha.me is unset, so I expected "displayname" field to either be absent or to say "anton".

@matrixbot
Copy link
Collaborator Author

This comment was originally posted by @S7evinK at matrix-org/dendrite#3348 (comment).

This should already be fixed by #3326 on main.

@matrixbot
Copy link
Collaborator Author

This comment was originally posted by @anton-molyboha at matrix-org/dendrite#3348 (comment).

Oh, my bad. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant