When you give someone a taste of their own medicine, you treat them as they have treated you. And we almost always use this expression when talking about bad treatment.
当你“give someone a taste of their own medicine(以其人之道还治其人之身)”的时候,你像他们对待你一样对待他们。我们几乎总是在谈论糟糕的待遇时使用这个表达。