New Yorkers may have to share their social media history and character references to obtain permits to carry concealed firearms in public, according to legislation signed by Gov. Kathy Hochul (D) on Friday evening.

Those seeking gun permits would have to disclose both their active and inactive social media accounts from the past three years as well as provide references the state can contact to confirm their “good moral character,” the legislation states. The requirements are just one component of several proposed changes to New York gun laws after parts of its existing restrictions on concealed carry permits were struck down in a Supreme Court ruling last week.

“I just signed a new law to keep New Yorkers safe – even in the face of a monumental setback from the Supreme Court. Thanks to @AndreaSCousins, @CarlHeastie, and our legislative partners for your quick work and collaboration to pass these critical gun safety reforms,” Hochul tweeted Friday night.

An applicant seeking a permit will need to meet with a licensing officer for an in-person interview, complete at least 16 hours of firearm training, and agree to store all firearms securely, according to the bill. The legislation will also create a statewide database for ammunition sales and license records and mandate sellers to keep records of every ammunition transaction.

New York law prohibits anyone younger than 21 from purchasing a firearm, and purchasers must have no previous convictions or serious offenses on record. The state previously had a provision limiting gun sales to those who have a “legally recognized reason for wanting to possess or carry a firearm,” but that provision was ruled unconstitutional by the Supreme Court last week.

On June 23, the Supreme Court reversed a lower court decision upholding New York’s 108-year-old law, with six justices voicing skepticism at the requirement to demonstrate a “proper cause” for obtaining a license. Justice Clarence Thomas went further, arguing there is “no other constitutional right” that requires demonstration of special need to government officers to obtain a concealed carry permit.

But Thomas agreed jurisdictions could ban concealed firearms in “sensitive places,” opening the door for state lawmakers to pass legislation that defines those terms. The legislation in New York would establish a definition that includes places where guns would be prohibited, such as Times Square, schools, government buildings, public transportation, places of worship, theaters, and stadiums, among others. The ban would also extend to private businesses unless they post signage indicating otherwise.

Hochul signed the bill just hours after the state Senate and then the Assembly voted in favor of the legislation Friday, just one day after the legislature convened for a special session called by Hochul in response to the Supreme Court ruling.

The requirement to provide access to one’s social media footprint likely stems from recent mass shootings in which investigators later found suspects had shared troubling posts on their accounts that may have hinted at their attacks. The suspect in a recent shooting at a subway in Brooklyn posted content on social media officials deemed “concerning.”

Suspects in other recent mass shootings also sent troubling messages before opening fire, including the gunman accused of killing 19 children and two teachers at an elementary school in Uvalde, Texas. The suspect, identified as 18-year-old Salvador Ramos, reportedly sent private text messages saying he was going to “shoot an elementary school.” Nikolas Cruz, the 19-year-old who opened fire at Parkland High School in Florida in 2018, also made social media posts that may have tipped off officials to his plans, such as photos of him holding guns and knives, according to WPLG.