US District Judge James S Otero has not yet made a decision in the case, but appeared to support Mr Trump’s attorneys during a hearing, saying the message “appears to be rhetorical hyperbole by a public official involving a public figure”.
The tweet in question arrived after Daniels, whose real name is Stephanie Clifford, and her attorney released a composite sketch of the man they said approached her in a parking lot after she agreed to publish an interview about her alleged affair with Mr Trump.
The president called the story "a total con job" on social media, describing the person Ms Daniels alleged was threatening to her as a "nonexistent man."
Charles Harder, a lawyer for Mr Trump, claimed the president was simply calling the claims "hogwash," rather than stating a fact about the alleged incident. Mr Harder also said the president was "calling BS" in the tweet posted to his personal Twitter account 18 April.
"A sketch years later about a nonexistent man," he wrote, sharing an image of the sketch. "A total con job, playing the Fake News Media for Fools (but they know it)!"
A sketch years later about a nonexistent man. A total con job, playing the Fake News Media for Fools (but they know it)! https://t.co/9Is7mHBFda— Donald J. Trump (@realDonaldTrump) April 18, 2018
Meanwhile, the same judge is presiding over a separate lawsuit involving an alleged $130,000 "hush money" payment the president’s former lawyer sent Ms Daniels during the 2016 election to remain silent about her supposed affair with Mr Trump.
He announced a hearing would be held in December to determine the validity of the payment deal, which Ms Daniels’ lawyer, Michael Avenatti, has called erroneous.
Mr Trump’s attorneys previously threatened Ms Daniels with legal action if she continued to speak out about the payment, claiming she was breaking the agreement they had agreed during the campaign.
Mr Avenatti, who has expressed interest in running in the 2020 presidential elections, has said his goal in the lawsuit is to depose the president and his former attorney, Michael Cohen, forcing their sworn testimony to discuss what they knew about the payment, which is a potential violation of campaign finance laws.