mlem icon indicating copy to clipboard operation
mlem copied to clipboard

`mailto:` links do not open when tapped

Open brodyhoskins opened this issue 1 year ago • 3 comments

Introduction

I recently found a link on Lemmy with the mailto: URI scheme. When tapped an indicator appears as if it's loading, but nothing happens.

This got me wondering if other non-HTTP links work.

Requirements

  • Support mailto: URI scheme
  • Possibly support other URI schemes

What I Need

I'd like mailto: links to be handled by iOS' default email app.

brodyhoskins avatar Jan 16 '25 21:01 brodyhoskins

I agree, this would be nice to have.

When tapped an indicator appears as if it's loading, but nothing happens.

This is Mlem checking to see whether the link goes to a Lemmy user/community. Officially, the supported link types for communities and users are [email protected] and @[email protected], but we found that people occasionally used the incorrect [email protected] syntax. So Mlem will attempt to resolve that link type too. We should definitely make it fall back to opening the mail app if a Lemmy instance wasn't found.

Sjmarf avatar Jan 16 '25 21:01 Sjmarf

We should definitely make it fall back to opening the mail app if a Lemmy instance wasn't found.

To be clear, I'm talking about mailto: links specifically, like mailto:[email protected].

I'm not even specifically requesting support for it, but rather support for schemes that iOS supports in general.

brodyhoskins avatar Jan 16 '25 23:01 brodyhoskins

Ah, okay 👍 Yeah, we could support all schemes in general.

[email protected] links are converted by our parser into [[email protected]](mailto:[email protected]). Our link handler receives the mailto:[email protected] link when you tap it, but fails to actually do anything beside show a loading toast. That's what I was referring to above.

Sjmarf avatar Jan 23 '25 22:01 Sjmarf