Skip to content
This repository has been archived by the owner on Nov 25, 2024. It is now read-only.

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

Closed
anton-molyboha opened this issue Mar 27, 2024 · 2 comments
Closed

Comments

@anton-molyboha
Copy link
Contributor

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".

@S7evinK
Copy link
Contributor

S7evinK commented Mar 27, 2024

This should already be fixed by #3326 on main.

@anton-molyboha
Copy link
Contributor Author

anton-molyboha commented Mar 28, 2024

Oh, my bad. Thank you!

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

No branches or pull requests

2 participants