The right of him through whom God makes you happy (surur) is that you first praise God, then you thank the person.
وحق من سرك الله تعالى به أن تحمد الله عزوجل أولا ثم تشكره.
Similar narrations
Al-Khiṣāl #74The gratitude for any blessing - no matter how great it may be - is to praise God the Honorable the Exalted.”
Risālat al-Ḥuqūq #29The right of him who does a kindly act (dhu l-ma'ruf) toward you is that you thank him and mention his kindness; you reward him with...