matrix-org / matrix-spec

The Matrix protocol specification
Apache License 2.0
197 stars 97 forks source link

Support thirdparty network queries over federation #1152

Open deepbluev7 opened 2 years ago

deepbluev7 commented 2 years ago

Suggestion

Currently you can query information about users, locations and protocols using the /thirdparty endpoints. This however only works for bridges/appservices running on your own homeserver, which makes the feature inaccessible to most users.

It would be nice if I could query if a user is from a bridged network and show an appropriate icon for that. I.e. show which users are irc users, so that I can take care to reply in the right format to them.

Additionally it would be nice to be able to query where a room is bridged to.

It seems a bit tricky however to define, what server to send the request to. A request about a user makes sense to send to the users homeserver, but what about a location query for an alias?Asking the server that controls the alias makes some sense, but will give you a partial view. And I have no idea at all how a query for supported protocols would look like.

deepbluev7 commented 2 years ago

Related: https://github.com/matrix-org/matrix-spec-proposals/pull/2346

Half-Shot commented 2 years ago

Honestly, my pretty deeply held view on this is that we should scrap the thirdparty endpoints and replace them with Matrix rooms + RPC events for quite a few reasons:

There are downsides, such as your query response lingering in the room forever (hence, crypto). I suspect when we finally build out ephemeral messaging for the location sharing project, this can be put to bed though.

bleonard252 commented 2 years ago

@Half-Shot I do think having a flag in m.room.create or somewhere similar that tells clients that a given room isn't for human consumption would be nice. It would be useful for other MSCs as well, for use cases like spaces, calls, Third Room, or game clients, to tell clients not to show a particular room type if it doesn't know how. I suppose the idea would be, if it can't reasonably be represented like a conversation, (micro)blog, forum, or similar, use the "data room" flag to specify "hide by default."

If there already is an MSC for it, point me in that direction. If not, I'd be glad to draft one \:)

"m.data_room": true, // hide this room by default
turt2live commented 2 years ago

Room types are already in the spec: https://spec.matrix.org/v1.3/client-server-api/#types

bleonard252 commented 2 years ago

Room types are already in the spec: https://spec.matrix.org/v1.3/client-server-api/#types

The spec does not indicate what should be done with room types that a client doesn't know about. Right now, unknown room types appear to be shown on most clients as regular rooms; I'm suggesting a "hide-by-default" marker to use where falling back to a conversational view does not make sense.

I'll take this into Matrix instead of derailing this issue further.