Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Give "rooms" a type (like msgtype) so they can be filtered by applications #1900

@alexgleason

Description

@alexgleason

I'm just starting to understand Matrix more in-depth now so please tell me if I'm misunderstanding anything.

Riot is an instant messaging platform built on top of Matrix. We use it like a traditional chatroom app to send and receive messages.

I want to build a brand new app on top of Matrix that isn't a chatroom. It doesn't use "m.room.message" at all, ever, for anything. It uses its own event types that Riot won't and shouldn't understand. Riot is a chat platform, and this is something else.

But when I make a new room to contain these events, the room shows up on Riot anyway. I don't want to see rooms from this other thing on Riot. Riot is a chat platform, so I only want to see "chatrooms". Therefore I want rooms created in Riot to have "roomtype": "m.chatroom". Then Riot will only show rooms I belong to of this type, and my other app can also have its own type.

In this example, I am thinking of building Snapchat on Matrix. So my app might create rooms with "roomtype": "com.alexgleason.selfdestruct". A new room is created for 1-on-1 interaction between users. So whenever Alice and Bob send Snapchats to each other, it always happens in the same room. Events in these rooms might look like this:

{
  "msgtype": "com.alexgleason.selfdestruct.photo",
  "photoUrl": "https://static.myserver.com/PHOTO_ID",
  "destructTime": 5,
  "text": "hheeeeyyy!!!",
  "textPosition": 100
}

I have considered integrating this with Riot, using m.room.message as the event type and using my own msgtype (maybe "msgtype": "com.alexgleason.selfdestruct") with a fallback to body. This way the messages still make sense in Riot, but you need the Snapchat app for the full experience. But integrating Snapchat into a chatroom channel doesn't make sense. I don't want two applications to look at the same thing through a different lens; I want two separate applications that share the underlying data and framework but behave differently.

A goal of Matrix is to build a decentralized internet. So, I want one ID (@alexgleason:matrix.org) to let me log into any communication platform, and I want all associated data to be stored on that homeserver. So we can have different types of apps use the same account to show different things, but all the data is stored in the same place.

I have considered that another way is to have a different user account for each platform. This way the rooms are separate. But this seems wrong; I could still log into my "Snapchat" account with Riot and the interface would be incoherent. I also don't want to keep track of all these different IDs which pose problems when namespaced for different applications (ex. I don't want to be @alexgleason_chatroom:matrix.org when logging into Riot and @alexgleason_selfdestruct:matrix.org when logging into "Snapchat").

EDIT: Some discussion taking place here https://matrix.to/#/!XqBunHwQIXUiqCaoxq:matrix.org/$1486841994982386ljSmT:matrix.org

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions