Sayyiduna Abu Hurairah (may Allah be pleased with him) narrates that I heard the Messenger of Allah (peace and blessings be upon him) say: "Whoever hears a person announcing a lost item in the mosque, let him say to him this (supplication) « لاَ أَدَّاھَا اللهُ عَلَيْكَ » May Allah not return it to you, for the mosques were not built for this purpose."
Abu Uthman narrates that Sayyiduna Ibn Mas'ud (may Allah be pleased with him) heard a man announcing a lost item in the mosque, so he became very angry and rebuked him harshly. Then a person said to him, "O Ibn Mas'ud, you were not one to use foul language?" He replied, "We were commanded to act in this manner (on such occasions)."