Opioids and breastfeeding

My incision opened up over the weekend and I have tried my best not to take any pain meds. Around 12am before feeding I took opioid pain medication. Do I need to pump and dump 7hours later or is it safe to give baby breast milk.