26 Joab, at war in Rabbah against the Ammonites, captured the royal city. 27 He sent messengers to David saying, "I'm fighting at Rabbah, and I've just captured the city's water supply. 28 Hurry and get the rest of the troops together and set up camp here at the city and complete the capture yourself. Otherwise, I'll capture it and get all the credit instead of you." 29 So David marshaled all the troops, went to Rabbah, and fought and captured it. 30 He took the crown from their king's head - very heavy with gold, and with a precious stone in it. It ended up on David's head. And they plundered the city, carrying off a great quantity of loot.
Matthew Henry's Commentary on 2 Samuel 12:26-30
Commentary on 2 Samuel 12:26-31
(Read 2 Samuel 12:26-31)
To be thus severe in putting the children of Ammon to slavery was a sign that David's heart was not yet made soft by repentance, at the time when this took place. We shall be most compassionate, kind, and forgiving to others, when we most feel our need of the Lord's forgiving love, and taste the sweetness of it in our own souls.