Skip to content

Replace Twitter username URLs with @s for better syndication

Jamie Tanna requested to merge feature/twitter-username-bridgy into master

Up until now, syndicating notes/replies to Twitter has required writing @-usernames for Twitter usernames, which isn't very friendly for folks viewing the site / following an h-feed.

We can improve this by rewriting Twitter profile URLs with @{username} which when converted to plaintext by Brid.gy should publish it with an @-mention.

However, because we don't want to rewrite full Twitter URLs, we need to be a bit more careful with the regex. We want to catch only URLs that end with a couple of special characters as it is most likely that these mentions will have these characters after them.

Merge request reports