“Two ‘Eid came together at the time of the Messenger of Allah (ﷺ), so he led the people in prayer, then he said: ‘Whoever wishes to come to Friday (prayer), let him come, and whoever wishes to stay behind, let him stay behind.’”
Sunan Ibn Majah Book 5, Hadith 510