yes but in reality it doesn't protect foreigners only Thai people. It is a very strange law where truth is no defence against defamation. The law literally makes saying the truth illegal. Thailand can't even stop serious criminal defamation and slander on Facebook which has become terrible in Thailand now.