Mishkat al-Masabih 1728
وَعَنْ أَنَسٍ قَالَ: مَرَّ النَّبِيُّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ بِامْرَأَةٍ تَبْكِي عِنْدَ قَبْرٍ فَقَالَ: «اتَّقِي اللَّهَ وَاصْبِرِي» قَالَتْ: إِلَيْكَ عَنِّي فَإِنَّكَ لَمْ تُصَبْ بِمُصِيبَتِي وَلَمْ تَعْرِفْهُ فَقِيلَ لَهَا: إِنَّهُ النَّبِيُّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ. فَأَتَتْ بَابَ النَّبِيِّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ فَلَمْ تَجِدْ عِنْدَهُ بَوَّابِينَ فَقَالَتْ: لَمْ أَعْرِفْكَ. فَقَالَ: «إِنَّمَا الصَّبْرُ عِنْدَ الصَّدْمَةِ الْأُولَى»
From Anas, who said: The Prophet ﷺ passed by a woman weeping at a grave and said: "Fear Allah and be patient." She said: "Get away from me, for you have not been struck by my calamity," and she did not recognise him. It was said to her: "It is the Prophet ﷺ." So she came to the door of the Prophet ﷺ and did not find any doorkeepers with him. She said: "I did not recognise you." He said: "Patience is only at the first blow."