The Messenger of Allah ﷺ said: If any one of you has pain in his abdomen, but is doubtful whether or not anything has issued from him, be should not leave the mosque unless he hears a sound or perceives a smell.
قَالَ رَسُولُ اللَّهِ ﷺ إِذَا وَجَدَ أَحَدُكُمْ فِي بَطْنِهِ شَيْئًا فَأَشْكَلَ عَلَيْهِ أَخَرَجَ مِنْهُ شَىْءٌ أَمْ لاَ فَلاَ يَخْرُجَنَّ مِنَ الْمَسْجِدِ حَتَّى يَسْمَعَ صَوْتًا أَوْ يَجِدَ رِيحًا