project-robius / project-robius/robrix

Properly handle `matrix.to` links for Rooms

Open
#87 3 comments 0 reactions 1 assignee View on GitHub

@tyreseluo is already working on this.

Since Jan 13, 2025.

enhancement help wanted
Dominant language
Rust
Stars
487
Forks
68
Avg merge
1h 22m
Merged PRs (30d)
54

Description

These links are special and should be handled via in-app actions rather than by opening them as a regular URL in the system browser.

There is a separate issue #222 for handling matrix.to links to a specific Event, which is much more complicated.

Implementation

Currently, Robrix just ignores matrix.to links that are clicked on, as seen in the code here: https://github.com/project-robius/robrix/blob/61f49943b3bb89161dfca26c8cfaec98705f1f42/src/home/room_screen.rs#L857-L868

Note that issue #84 already covers one specific case of this: links to Users, which should be displayed as a special UserTag widget.

This issue covers one other type of matrix.to links:

  • Rooms via alias (e.g., https://matrix.to/#/#matrix:matrix.org), and rooms by ID (e.g., https://matrix.to/#/!cURbafjkfsMDVwdRDQ:matrix.org)
Links to a room

We should create a RoomTag widget similar to the UserTag widget mentioned above, which looks like this in Element:
image

Upon click, if the current user has already joined the room, we simply open that room's timeline view.

However, if the user has not yet joined that room, Robrix should open a preview view of the room that shows the last few messages

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.