Apple has been talking with telecom companies in China to find ways to reduce spam received through its iMessage service. This news comes just days after China began criticizing the iPhone maker for allegedly allowing illegal content on its platform.

On Tuesday, Apple was targeted by a 30-minute special report on Chinese state-run media that said the company allowed illegal content such as gambling apps. By Thursday, Apple confirmed to Reuters, “We are in touch with domestic telco companies to see what additional steps could be taken to reduce this inconvenience.”

An Apple spokesperson also said:

We are currently working on additional ways to further reduce it, including more advanced machine learning models to identify it and more tools to block fraudulent accounts.

China is Apple’s second-largest market behind the United States, announcing earlier this week its revenue there increased by 19 percent in the June quarter. Despite this, the company has been openly criticized in recent weeks as Chinese regulators have started a campaign to clean up spam and unsolicited calls.

Reuters explains:

The criticism highlights an increasingly fraught balancing act for the firm in the world’s biggest smartphone market at a time of mounting trade tensions between China and the United States. Both countries have imposed tariffs on exported goods and are fighting over patents and technology.

Though many might argue this situation is mainly about U.S-Chinese relations and not spam, most would probably agree Apple and other tech companies should do a better job at blocking this type of annoying content. If the situation leads to some changes, that would be a good thing, no?