Email or username:

Password:

Forgot your password?
dansup

One of the challenging aspects of building a federated mobile app is parsing post captions and being able to render them properly

See, when you make a post with mentions or hashtags, mastodon converts it to HTML and mobile apps have to deconstruct that HTML to be able to render mentions, hashtags and links properly

We could just render the HTML, but when you would tap on a hashtag or mention, it would open the browser instead of in-app

Indices and entity maps ftw, thanks backend!

#pixeldev

3 comments
Pepijn Schmitz

@dansup Does Mastodon not use id or class attributes or something like that to tag the different kinds of content?

dansup

@captainchaos Well, its more complicated than that.

Mastodon and Pixelfed do provide mentions and hashtags as lists in the federated activity, you can't just trust the HTML itself because not every platform uses the same attributes

We can use the mention/hashtag lists to build the entitymap with indices we can provide to clients so they can properly implement deep linking

Mlékař Dan 🦣

@dansup Weirdly most mastodon clients I’ve tried handle Pixelfed posts like this… all hashtags are just hyperlinks to original instance search. Very annoying.

I am stoked that you are working on such quality of life feature for the app!

Go Up