I said: Messenger of Allah, tell us the legal injunction about (visiting) Bayt al-Muqaddas (the dome of the Rock at Jerusalem). The Messenger of Allah ﷺ said: go and pray there. All the cities at that time were effected by war. If you cannot visit it and pray there, then send some oil to be used in the lamps.
عَنْ مَيْمُونَةَ مَوْلاَةِ النَّبِيِّ ﷺ أَنَّهَا قَالَتْ يَا رَسُولَ اللَّهِ أَفْتِنَا فِي بَيْتِ الْمَقْدِسِ فَقَالَ ائْتُوهُ فَصَلُّوا فِيهِ وَكَانَتِ الْبِلاَدُ إِذْ ذَاكَ حَرْبًا فَإِنْ لَمْ تَأْتُوهُ وَتُصَلُّوا فِيهِ فَابْعَثُوا بِزَيْتٍ يُسْرَجُ فِي قَنَادِيلِهِ