David consoled Hanun after his father, Hahash, died. Ammonite princes questioned David's motives suggesting he spied the city to overthrow it. Hanun humiliated David's servants by shaving half of their beards and cutting off their garments at the hips (2 Sam. 10:1-5). People can easily misjudge your kind and gracious motives.
When Ammon saw they that they had become odious to David, they hired the Arameans and the king of Maacah who gathered 33,000 soldiers. David sent Joab, his army and his mighty men to face Ammon in battle array at the entrance of the city and Arameans by themselves in the field (2 Sam. 10:6-8). Spiritual warfare surrounds you from all sides when your motives are misjudged.
When Joab saw the battle was set against him in front and rear, he selected choice men of Israel to face the Arameans. The remainder were placed with Abishai his brother to face Ammon. If the Arameans became too strong for Joab, then Abishai could help him and vice-versa. Joab said to be strong and courageous for the sake of Israel and for the cities of their God so the Lord may do what is good in His sight. Ammon fled and entered the city when they saw the Arameans flee before Joab (2 Sam. 10:9-14). Be strong and courageous since God will do what is good in His sight when your motives are misjudged.
David killed 700 charioteers and 40,000 horsemen of the Arameans. They made peace with Israel and served them so the Arameans feared to help the sons of Ammon anymore (2 Sam. 10:15-19). God defeats the evil schemes of those who misjudge your motives.
When your motives are misjudged, trust God to fight the spiritual battle since He will do what is good in His sight and defeat the evil schemes.