Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:9:62

They swear by Allah to you ˹Muslims˺ to satisfy you. But Allah and His Messenger are more worthy for them to satisfy, if they should be believers.  

They swear by God to you, O believers, that what has reached you of the Messenger being injured they did not do, so that they might please you, but God and His Messenger are more deserving that they should please them, through obedience, if they are, true, believers (the merging of the pronouns into one ˹in yurdūhu, ‘their pleasing them’˺ is because the ‘pleasure’ of both ˹God and His Messenger˺ are mutually dependent; ˹either that˺ or it is because the predicate of Allāhu wa-rasūluhu, ‘God and His Messenger’, has been omitted).
القرآن:٩:٦٢

يَحْلِفُونَ بِاللَّهِ لَكُمْ لِيُرْضُوكُمْ وَاللَّهُ وَرَسُولُهُ أَحَقُّ أَنْ يُرْضُوهُ إِنْ كَانُوا مُؤْمِنِينَ  

{يحلفون بالله لكم} أيها المؤمنين فيما بلغكم عنهم من أذى الرسول أنهم ما آذوه {ليرضوكم والله ورسوله أحقُّ أن يرضوه} بالطاعة {إن كانوا مؤمنين} حقا وتوحيد الضمير لتلازم الرضاءين أو خبر الله ورسوله محذوف.