Exactly, Iran needs to get out of the habit of looking at everything in black and white terms. It expects Muslim countries, like Turkey, Pakistan, Arabs, to be in a state of war with the US before it will have any relations with them. But it's flexible with non-Muslim countries like Russia and India and prefers friendship with them.
Iran needs to learn that in the real world everyone doesn’t enjoy the luxury of isolating themselves. They especially can’t have antagonistic relations with the West. We already know what happened to Iraq, Syria, Libya etc. Based on its all-or-nothing policy Iran has found itself with no friends. The only allies they had were the proxies, and they’re either dead or missing.
Iran needs to start reevaluating its foreign policy and start developing relations with potential allies, starting with neighboring Muslim countries, including Turkey, Pakistan, Egypt etc.