Praise be to Allah
The mosques should be free of announcements that have to do with worldly matters, which include telling people about a wedding feast or inviting them to it, because the mosques were not built for that; rather they were built to establish worship, teach knowledge, and spread goodness. Muslim narrated in his Saheeh (568) that Abu Hurayrah (may Allah be pleased with him) said: The Messenger of Allah (blessings and peace of Allah be upon him) said: “Whoever hears a man making a lost property announcement in the mosque, let him say: May Allaah not restore it to you, for the mosques were not built for this purpose.”
And Allah knows best.