Not sure what country your frien passport is from but most Thai embassy’s consulates have a fb page you can message them direct to get the official answer but a few people here have already suggested it’s six months which sounds correct
My experience has been only if your travelling to the country the passport is issued can you travel up to the date of expiry which is what happened to me a year ago .