Thank you!
What the article's author wrote is fine. The Hagia Sophia was a mosque for about five hundred years. It is a mosque today. The last time it was a church is the 15th century. It is perfectly fine to mention a famous mosque in an article about mosques without getting into its (literally) ancient history.
pirate787, on the other hand, deliberately hid its long history as a mosque in service of proving a point.