Tehran taunted the US president over his midterms defeat as Republicans took to social media to acknowledged the role the war in Iran played in their defeat.