How Did Allah Inform the Prophet? (Surah Tahrim, 66:3)

بِسْمِ اللَّهِ الرَّحْمَٰنِ الرَّحِيمِ

66:3 وَإِذْ أَسَرَّ النَّبِيُّ إِلَىٰ بَعْضِ أَزْوَاجِهِ حَدِيثًا فَلَمَّا نَبَّأَتْ بِهِ وَأَظْهَرَهُ اللَّهُ عَلَيْهِ عَرَّفَ بَعْضَهُ وَأَعْرَضَ عَن بَعْضٍ ۖ فَلَمَّا نَبَّأَهَا بِهِ قَالَتْ مَنْ أَنبَأَكَ هَٰذَا ۖ قَالَ نَبَّأَنِيَ الْعَلِيمُ الْخَبِيرُ

When the Prophet disclosed a matter in confidence to one of his wives, and she then divulged it (to another), and Allah made it known to him, he confirmed part thereof and repudiated a part. Then when he told her thereof, she said, “Who told thee this? “He said, “He told me Who knows and is well-acquainted (with all things).”

33:53 يَا أَيُّهَا الَّذِينَ آمَنُوا لَا تَدْخُلُوا بُيُوتَ النَّبِيِّ إِلَّا أَن يُؤْذَنَ لَكُمْ إِلَىٰ طَعَامٍ غَيْرَ نَاظِرِينَ إِنَاهُ وَلَٰكِنْ إِذَا دُعِيتُمْ فَادْخُلُوا فَإِذَا طَعِمْتُمْ فَانتَشِرُوا وَلَا مُسْتَأْنِسِينَ لِحَدِيثٍ ۚ إِنَّ ذَٰلِكُمْ كَانَ يُؤْذِي النَّبِيَّ فَيَسْتَحْيِي مِنكُمْ ۖ وَاللَّهُ لَا يَسْتَحْيِي مِنَ الْحَقِّ

O you who believe! Do not enter the prophet’s houses,- until permission is granted to you,- for a meal, (and then) not to wait for its preparation. But when you are invited, enter; and when you have taken your meal, disperse, without showing fondness for hadith/ narrations/vain talks. Such (behaviour) persecutes the Prophet. He is ashamed to dismiss you, but Allah is not ashamed (to tell you) the truth.