deltachat / deltachat-core-rust

Delta Chat Rust Core library, used by Android/iOS/desktop apps, bindings and bots 📧
https://delta.chat/en/contribute
Other
658 stars 84 forks source link

webxdc: support mailto links #3312

Closed r10s closed 2 years ago

r10s commented 2 years ago

we could allow mailto: links from webxdc, they could just open a chat with the given address in delta chat, subject/body can be preset as usual. this would allow an webxdc to prepare information to be sent to ppl outside the current chat - while making it transparent, which information are actually sent.

this issue is mainly to track the idea, most work will probably be needed in the UI, however, maybe a mailto-helper-ffi may be useful in general.

Simon-Laux commented 2 years ago

BTW desktop does already support this

r10s commented 2 years ago

ios does not yet support that, i created an issue for that at https://github.com/deltachat/deltachat-ios/issues/1579

adbenitez commented 2 years ago

in general I think all links should be allowed, just show a dialog like Telegram does:

image

(then mailto are safe to open directly and could skip this dialog)

otherwise it is a real pain that https links have no way to be open and it is a bummer for app developers

r10s commented 2 years ago

in general I think all links should be allowed, just show a dialog like Telegram does:

off-topic: well, https-links is another question and another issue :) https-links will opens some additional attack vectors, esp. if they can be opened without the behalf of the user, which needed to be checked carefully. implementation-wise, that may be some work to differ between a "normal link" and some "silent https requests" on all platforms. so we decided not to allow that at all for now. in telegram, not sure if this restriction exist at all, maybe a webapp can just download things from external servers - which is a things we do not want.

i can imagine, we allow some limited form of links somehow at some point, maybe by an explicit api as webxdc.openInBrowser("https://example.org") that shows a confirmation then.

or we add some "project_url" link similar to "source_code_url" - the question is what these external links are really needed for.

r10s commented 2 years ago

on-topic: does Android support mailto:-links in webxdc?

that intermediate step would be needed anyway.

r10s commented 2 years ago

on-topic: does Android support mailto:-links in webxdc?

no, the testing app says "please embed needed resources", i created an issue at https://github.com/deltachat/deltachat-android/issues/2317

mailto is also documented at https://github.com/deltachat/deltachat-android/blob/master/docs/release-checklist.md meanwhile, so we can close this issue as there is no actionable item left for core.