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

Invites don't show the name or alias of the room you are being invited to. #321

Closed
ara4n opened this issue Nov 3, 2015 · 9 comments
Closed

Comments

@ara4n
Copy link
Member

ara4n commented Nov 3, 2015

Instead they show only the name of the person who has invited you. In the main room list, I suggest we show the name of the room as it would appear in Recents. On the 'join' screen we would then be told who actually invited you.

@ara4n ara4n modified the milestone: Ragnarok Nov 29, 2015
@kegsay kegsay self-assigned this Dec 7, 2015
@kegsay
Copy link
Contributor

kegsay commented Dec 8, 2015

Fixed in matrix-org/matrix-react-sdk@8edfd60

@kegsay kegsay closed this as completed Dec 8, 2015
@ara4n ara4n reopened this Dec 13, 2015
@ara4n
Copy link
Member Author

ara4n commented Dec 13, 2015

This is still broken - @matthew:matrix.org sent an invite to @Matthew2:matrix.org to join #test:matrix.org (via '/invite @Matthew2:matrix.org' from Vector whilst in the room). The invite was shown in matthew2's vector as "Invite from @matthew:matrix.org" rather than "Invite to #test:matrix.org". Separately, the push notification that matthew2 received leaked an ugly room ID.

@ara4n
Copy link
Member Author

ara4n commented Dec 13, 2015

This looks to be a serverside issue - we simply don't receive the data from synapse :(

@NegativeMjark - please can you get this on your radar or bounce it to @erikjohnston or whoever got it wrong first time.

{
  "start": "s8203666_18723_1633_237521_2134",
  "chunk": [
    {
      "prev_content": {
        "membership": "leave"
      },
      "origin_server_ts": 1450020720509,
      "sender": "@matthew:matrix.org",
      "event_id": "$145002072025781nccIP:matrix.org",
      "age": 220,
      "unsigned": {
        "prev_content": {
          "membership": "leave"
        },
        "prev_sender": "@matthew2:matrix.org",
        "age": 220,
        "invite_room_state": [
          {
            "content": {
              "join_rule": "public"
            },
            "type": "m.room.join_rules",
            "sender": "@matthew:matrix.org",
            "state_key": ""
          }
        ],
        "replaces_state": "$145002009025089tPIvz:matrix.org"
      },
      "state_key": "@matthew2:matrix.org",
      "content": {
        "membership": "invite"
      },
      "room_id": "!vfFxDRtZSSdspfTSEr:matrix.org",
      "invite_room_state": [
        {
          "content": {
            "join_rule": "public"
          },
          "type": "m.room.join_rules",
          "sender": "@matthew:matrix.org",
          "state_key": ""
        }
      ],
      "user_id": "@matthew:matrix.org",
      "replaces_state": "$145002009025089tPIvz:matrix.org",
      "type": "m.room.member"
    }
  ],
  "end": "s8203695_18723_1633_237521_2134"
}

@kegsay
Copy link
Contributor

kegsay commented Dec 14, 2015

According to the spec, the following event types are passed through:

  • "m.room.join_rules", "m.room.canonical_alias", "m.room.avatar", "m.room.name"

#test:matrix.org was created well before most of these things were A Thing (specifically m.room.canonical_alias) so there would be no alias to send to the client. Indeed, checking that room on matrix.org/beta does not show any canonical alias for that room.

@ara4n
Copy link
Member Author

ara4n commented Dec 14, 2015

So basically this is a server bug to say "please provide a random alias if there's no canonical one"?

@kegsay
Copy link
Contributor

kegsay commented Dec 15, 2015

I don't think the server should lie and fabricate a fake m.room.canonical_alias event. However, it may be acceptable for m.room.aliases to be included in the allowed event types and leave it to clients to do a fallback display.

The general case will never produce what is happening to #test:matrix.org because the nominal flow is to create a room with a given alias (and /createRoom will automatically set the canonical_alias based on this). We don't actually expose any way in Vector to add or remove aliases from a room, so this is only going to be an issue for existing rooms.

The reason why #test:matrix.org is shown as that anyway is because of the fallback logic existing in the JS SDK to resort to using m.room.aliases rather than using the room ID. Using the same logic here feels acceptable, but has all the pitfalls associated with alias use (specifically that two clients may pick different aliases).

tl;dr - Add m.room.aliases to the invite_room_state and everything works.

@kegsay
Copy link
Contributor

kegsay commented Dec 15, 2015

I don't believe this is a vector issue any longer. Will leave this for a bit then close.

@ara4n
Copy link
Member Author

ara4n commented Dec 16, 2015

ok. will raise as syn issue

@ara4n
Copy link
Member Author

ara4n commented Dec 16, 2015

Raised as SYN-551

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

No branches or pull requests

2 participants