I disagree.
You presume to know how others will act toward you before they do, and you act under that presumption without knowing.
This variation of the golden rule is not moral.
If you act toward them in ways you presume to believe they will act toward you first, then you are being prejudicial. And by acting in this way you will likely inspire them to act that way back, which only reinforces your prejudices through self-fulfillment.
If you do act toward them in response to ways that they have already acted toward you first.... then this is a philosophy of revenge.
A truly moral person does not exact revenge but will continue to be moral regardless of how you are treated.