Okay, let's put aside things we had known before and clarify some grammar uncernanties may occure in a typical conversation or a chat:
Who or Whom?
For this, simply answer the question you wanna ask with the forms of he or him
if the answer is he, use who
if the answer is him, use whom
let's check an example:
1. who/whom cooked these tasty brownies?
him cooked these brownies [sounds not really natural]
he cooked these brownies [sounds correct]
so the right way of saying the sencence is: who cooked these tasty brownies?
2. to who/whom you gave these fireworks?
I gave them to he [wrong]
I gave them to him [correct]
so the right way of saying the sencence is: to whom you gave these fireworks?
3. with who/whom are you planning on shampooning these dirty koalas?
I plan on shampooning with him [correct]
I plan on shampooning with he [wrong]
so the sentence is: with whom are you planning on shampooning these dirty koalas?
4. who/whom did you invite to this fabolous slip'n side'n mayonesse party?
I invited he [wrong]
I invited him [correct]
Him sounds better, so we should stick with whom in this example
correct sentence: whom did you invite to this fabolous slip'n side'n mayonesse party?