James Gunn (left) with his Guardians of the Galaxy star Chris Pratt at a 2017 premiere eventAP Photo / Eugene Hoshiko

When Disney fired James Gunn last July, it seemed like an object lesson of that ever-relevant and oft-repeated internet maxim: Never tweet. Gunn, the director of Marvel’s popular Guardians of the Galaxy movies, had joined Twitter in 2008 when it was a little-scrutinized sounding board for half-baked jokes and unprintable thoughts. He had also long worked in the transgressive world of Troma Entertainment, a genre-movie company that specializes in churning out cheap, self-aware trash. As a result, Gunn’s Twitter feed was littered with tasteless, offensive material—all of it years old. When several right-wing online figures unearthed some of the worst tweets and began circulating them, Disney quickly cut ties with the filmmaker.

Eight months later, the studio has reversed its decision. Gunn will direct Guardians of the Galaxy Vol. 3, which he confirmed Friday in his first tweet since the summer of 2018. According to Deadline, the Disney Studios chairman Alan Horn decided to rehire Gunn “months ago,” having met with the filmmaker and accepted his apology. Marvel reportedly hadn’t even been in talks with other candidates to replace Gunn in the intervening months, and the Guardians cast (including Chris Pratt, Zoe Saldana, Bradley Cooper, Karen Gillan, and Vin Diesel) had called for his rehiring, with the actor Dave Bautista mounting a full-court press for Gunn’s reinstatement.

What changed Disney’s mind? Per Deadline, Horn was impressed with Gunn’s public and private comportment after the firing; the director didn’t blame Disney, and he wasn’t involved in any additional scandals. The narrative that Gunn’s firing had been engineered by right-wing Twitter personalities who were angry about the director’s criticism of President Donald Trump also gained prominence. Plus, Gunn continued to get work—he was hired by Warner Bros. last October to write a new Suicide Squad film for the rival DC Comics movie universe, a project that he’ll complete before returning to Marvel for Guardians 3. In other words, Gunn’s quiet and straightforward handling of the entire situation, combined with the Hollywood establishment’s continued support of him, turned the tide in his favor.

Still, Disney’s reversal illustrates how difficult it can be to determine when a so-called joke is offensive or harmful enough to warrant serious professional consequences. After all, some of Gunn’s tweets (including those that made light of pedophilia and sexual assault) are genuinely uncomfortable to read today, even if they were intended as a Twitter version of shock-jock radio. Gunn openly addressed his earlier mentality: “I viewed myself as a provocateur, making movies and telling jokes that were outrageous and taboo … In the past, I have apologized for humor of mine that hurt people. I truly felt sorry and meant every word of my apologies.”

So what separates Gunn’s tweets from, say, the bigoted Twitter tirade that got Roseanne Barr fired by ABC (another part of the Disney Corporation)? For one, Barr’s invective about African Americans and various conspiracy theories was a years-long problem on her social-media feeds that continued into the present day and that appeared to reflect personal beliefs—weakening Barr’s argument that her tweets were just jokes made “in bad taste.” And unlike Gunn, Barr lost the support of much of her cast and crew, some of whom refused to participate in future seasons of her show. She eventually agreed to let the Roseanne reboot go on without her and with a new name.

It’s worth noting that before ABC finally cut bait, Barr had been insulated by her show’s huge ratings. Massive success can help public figures survive outrage over abhorrent behavior—regardless of their efforts to meaningfully address or apologize for their mistakes. While morality matters in Hollywood, market results do, too. The director and actor Mel Gibson has returned to major studio work despite past incidents of alleged domestic abuse, racism, and anti-Semitism, thanks to his smaller and critically well-regarded film, Hacksaw Ridge. Gibson has generally avoided apologizing or accounting for his behavior as Gunn did, instead often referring to multiple incidents as “one mistake” or “one bad night.” More recently, the Fox News pundit Tucker Carlson faced no fallout from his employer after the progressive nonprofit Media Matters drew attention to a trove of racist and sexist remarks he made between 2006 and 2011 on a Tampa radio program. Carlson—one of the network’s highest-rated hosts—outright refused to “express the usual ritual contrition” about his previous comments and continues to broadcast.

Some might argue, as David French did for National Review, that the kind of “fishing expedition” that unearths a prominent figure’s old comments are the real problem. French claims such partisan investigations are part of “an outrage industry that spends millions of dollars (and countless man-hours) in the quest to destroy the lives and careers of the people it dislikes.” But Gunn isn’t just recovering because of his liberal political leanings. The penalties and rewards he has faced reflect, in large part, his contrition and refusal to wave away his past actions or blame his critics.

“I am very, very different than I was a few years ago; today I try to root my work in love and connection and less in anger,” Gunn said in 2018. “I used to make a lot of offensive jokes. I don’t anymore.” His apparent willingness to accept the hurt he’d caused and bear the cost ultimately helped him win his job back, as did his track record of turning an unproven property like Guardians of the Galaxy into a box-office hit. According to Deadline, Disney’s decision was carefully weighted and made after months of consideration; for both the company’s reputation and its future financial success, the move appears to be the right one.

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.