I would say do away with invisibility. Instead, add a DoNotDisturb button to use while you are in a class, special event, etc. If your friends refuse to honor that, find new friends. If you are bothered by strangers chatting to you at these times, block them.