Take heed that ye do not your alms before men, to be seen of them: otherwise ye have no reward of your Father which is in heaven.
Note 25 at Mt 6:1: Jesus' teaching on the giving of alms refers directly to money or goods given to the poor. However, the point He was making applies to all of our acts of righteousness. Our acts of love and charity should be done with the pure motive of blessing others. If our hidden motive is to gain self-recognition, God will not reward us (this verse). The pat on the back that we gain from people will be all the reward that we get (Mt 6:2), thus making the promise of Pr 19:17 of no effect.