Twitter Code Reveals How Upcoming Edit Button Might Work
Shortly after Tesla CEO and celebrity billionaire Elon Musk bought a 9.2% stake in Twitter and became the company’s largest shareholder earlier this month, he tweeted a poll asking if the platform should finally add a feature that users have been demanding for years — the ability to edit tweets.
Once he did that, the social media giant suddenly started talking publicly about an ‘Edit’ button for tweets that it has apparently been working on since 2021.
Musk has since offered to buy Twitter for a whopping $43 billion USD in cash. The Edit button, on the other hand, is scheduled to start rolling out to Twitter Blue subscribers for testing as part of the experimental ‘Labs’ feature-set in the coming months.
1/ We’ve been exploring how to build an Edit feature in a safe manner since last year and plan to begin testing it within @TwitterBlue Labs in the coming months. Sharing a few more insights on how we’re thinking about Edit 🧵 https://t.co/WbcfkUue8e
— Jay Sullivan (@jaysullivan) April 5, 2022
Several reverse engineers and data miners have already noticed references to the still-under-development ‘Edit Tweet’ feature in the code for the Twitter website and web app (via TechCrunch).
— Alessandro Paluzzi (@alex193a) April 15, 2022
Check out a GIF of the new Edit Tweet button in action below, courtesy of reverse engineer Nima Owji (@nima_owji):
I recorded a GIF from the upcoming #Twitter's Edit Button! pic.twitter.com/FPIRzzjUAF
— Nima Owji (@nima_owji) April 16, 2022
The feature will add a new ‘Edit Tweet’ button to the three-dot menu located at the top-right of your tweet. Not only does the new code show us where the Edit Tweet button will be located, but it also gives us clues as to how the feature will actually work.
Reverse engineer Jane Manchun Wong (@wongmjane) found that editing a tweet using this feature will actually create an entirely new tweet (with a fresh ID for back-end systems), preserving the original tweet and adding it to a representation of the tweet’s entire edit history.
Looks like Twitter’s approach to Edit Tweet is immutable, as in, instead of mutating the Tweet text within the same Tweet (same ID), it re-creates a new Tweet with the amended content, along with the list of the old Tweets prior of that edit
— Jane Manchun Wong (@wongmjane) April 16, 2022
Twitter does not seem to have decided on how it is going to make both the fact that a tweet has been edited and its edit history readily visible and easily accessible to users, though. That is pretty important for the platform to get right, considering how easily the ability to edit tweets could be abused to “alter the record of the public conversation,” as the company previously said.
While Twitter’s code does indicate that there will be an edit history for tweets once this feature goes live, the user interface for such functionality is uncertain at this point.
According to former Twitter employee Ben Sangster, the platform evaluated the possibility of an edit feature for tweets back in 2015, but ultimately concluded that the potential for such a feature to be abused was “too high to move forward.”
Honestly, as complex as the implementation might end up being, the abuse vectors are going to be far harder to manage / mitigate. I was part of an effort to investigate this back in 2015-ish (?) and we concluded that the potential for abuse was too high to move forward.
— Ben (@sangster) April 16, 2022