appdotnet / api-spec

App.net API Documentation is on the web at https://developers.app.net. Source for these docs is in the new-docs branch here. Please use the issue tracker and submit pull requests! Help us build the real-time social service where users and developers come first, not advertisers.
https://developers.app.net
950 stars 98 forks source link

Detect email addresses and add to annotations as mailto: #202

Closed edent closed 11 years ago

edent commented 12 years ago

In this post by @daltonc - https://alpha.app.net/dalton/post/590936 - the text is

@125f8 reporting ToS violations or any other kind of concern can/should be emailed to support@app.net

However, support@app.net is rendered as a username not an email address

support @app .net

With the entities looking like

[mentions] => Array
            (
                ...

                [1] => Array
                    (
                        [id] => 6532
                        [len] => 4
                        [name] => app
                        [pos] => 93
                    )

            )

What it should be IMHO, is a link entity

[links] => Array
            (
                [0] => Array
                    (
                        [len] => 15
                        [pos] => 85
                        [text] => support@app.net
                        [url] => mailto:support@app.net
                    )

            )
orianmarx commented 11 years ago

We should hopefully have all our bugs with email addresses where usernames were being parsed out of them now squashed. We won't be adding an email entity as these generally get linkified on mobile devices displaying plain text anyway and don't come up very often in posts to begin with. Of course on the client side you are free to run your own regex to linkify email addresses.