I believe "treat others as you wish to be treated" should be taken from a much higher approach than "if you like to be hugged, hug others". I've always seen it as more of "respect others and they will respect you." I still think it can apply to this situation though. Instead of setting social rules, we should show respect for the people we are interacting with.