ʿAbdullah bin ʿUmar said, "Messenger of Allah ﷺ said, 'Accept the marriage invitation if you are invited to it.' " Ibn ʿUmar used to accept the invitation whether to a wedding banquet or to any other party, even when he was fasting.
قَالَ رَسُولُ اللَّهِ ﷺ أَجِيبُوا هَذِهِ الدَّعْوَةَ إِذَا دُعِيتُمْ لَهَا قَالَ كَانَ عَبْدُ اللَّهِ يَأْتِي الدَّعْوَةَ فِي الْعُرْسِ وَغَيْرِ الْعُرْسِ وَهْوَ صَائِمٌ