As for the person who publicizes his own act of fornication and tells the matter to ordinary people, he is simply exposing himself and is not among those granted pardon. The Messenger of Allah—peace and blessings be upon him—said, “All of my community will be pardoned except those who sin openly.” They asked, “Who are the ones who sin openly?” He replied, “A man commits a sin, Allah conceals it for him, yet in the morning he goes out and speaks about it.”
If someone were to ask, “Is it better for a person who has committed fornication to go to the judge, confess, and have the prescribed punishment carried out, or is it better for him to conceal the matter?” the answer is nuanced.
Should the person have already repented sincerely, felt genuine remorse, and knows himself well enough to be certain that he will never return to the sin, then it is better for him not to go or inform on himself; let the affair remain between him and Allah, for whoever repents, Allah accepts his repentance.
But if he fears that his repentance is not wholehearted and that he might relapse into the sin, then it is better for him to go to the ruler, the judge, or another authority, confess, and have the prescribed punishment applied to him.
23- Ibn ʿAbbās (may Allah be pleased with them) reported that the Messenger of Allah—peace and blessings be upon him—said, “If the son of Adam were to possess a valley full of wealth, he would love to have another like it; nothing fills the eye of the son of Adam except dust, yet Allah turns in mercy to whoever repents.” (Agreed upon).