Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

offer mailto link parsing api #4620

Closed
adbenitez opened this issue Aug 15, 2023 · 4 comments · Fixed by #4829
Closed

offer mailto link parsing api #4620

adbenitez opened this issue Aug 15, 2023 · 4 comments · Fixed by #4829
Labels
enhancement New feature or request

Comments

@adbenitez
Copy link
Member

adbenitez commented Aug 15, 2023

mailto link parsing is implemented repeatedly in each UI client, in android mailto link parsing is far from perfect and it is known to be source of issues in the past and not parsing properly all mailto links etc.

it would be nice if core provided an API to simplify this, and avoid repeated implementation accross UIs

@adbenitez adbenitez added enhancement New feature or request good first issue Good for newcomers labels Aug 15, 2023
@adbenitez adbenitez changed the title offer mailto link parsing offer mailto link parsing api Aug 15, 2023
@link2xt
Copy link
Collaborator

link2xt commented Aug 17, 2023

How the API should look like? What function should be provided, which arguments it takes and what it returns?

I remove "good first issue" for now, I think it is more suitable for issues that only require an implementation without any discussion.

@link2xt link2xt removed the good first issue Good for newcomers label Aug 17, 2023
@adbenitez
Copy link
Member Author

adbenitez commented Sep 1, 2023

something like:

parseMailto(mailto: string) : Mailto

type Mailto {
    To []string
    Subject Option(string)
    Body Option(string)
}

an error is thrown if the mailto uri failed to be parsed, empty To is valid, the chatlist is offered for choosing in that case

@adbenitez
Copy link
Member Author

this has low priority tho, all the UIs have some custom mailto parsing currently, just nice to unify and to avoid problems, ex. the parser on android is too strict IIRC causing invalid parsing for some mailto urls that work in apps like k9mail

@link2xt
Copy link
Collaborator

link2xt commented Sep 2, 2023

Septias added a commit that referenced this issue Oct 26, 2023
close #4620 

This PR introduces a new core API to parse mailto links into a uniform
data format. This could be used to unify the different implementations
on the current platforms.
To complete this PR we have to decide for which APIs we want to expose
this (now) internal API (c, python, json-rpc, etc.), and if we want such
an API at all as it doesn't have a corresponding UI-PR and is not
_really_ needed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants