element-hq / element-android

A Matrix collaboration client for Android.
https://element.io/
GNU Affero General Public License v3.0
3.38k stars 725 forks source link

Handle non-spec-compliant matrix.to links #2552

Open ludwigbald opened 3 years ago

ludwigbald commented 3 years ago

Describe the bug Currently, clicking on a faulty matrix.to link such as https://matrix.to/#cctg:bubu1.eu opens Element, but nothing happens. The spec-compliant form of the link would be https://matrix.to/#/#cctg:bubu1.eu

To Reproduce Steps to reproduce the behavior:

  1. Click on https://matrix.to/#cctg:bubu1.eu on mobile.

Expected behavior There should be an error message, saying "This link is invalid."

First described in https://github.com/matrix-org/matrix.to/issues/179

My setup Android 10, Element 1.0.11, Chrome.

bmarty commented 3 years ago

I get a Toast (= temporary alert displayed at bottom of screen) when clicking on a faulty matrix.to link. We should probably display a dialog instead (more visible alert)