Misery loves compaby

Movies, books, shows and any source of media will tell you that misery loves company. It’s a bit overused and overwrought term. However it could not be closer to the truth. When people are miserable they either surround themselves with similarly miserable people or turn to others making them miserable as well. A miserable person hates, dislikes and/or gets more miserable when they are around happy people.
The question for me and for all of us when we are apart of the misery loves company duo is was I misery that wanted company or the company that misery wanted and sought for?