preserving mushrooms with vinegar

I have a mushroom recipe but I’m not sure how safe it is for how long.

It’s a simple hors d’oeuvre I got at a party, and someone just mentioned what was in it. So they may have left out some steps.
Fresh small button mushrooms, white onions sliced into thin rings, oil, vinegar, water and seasoning to taste. I made some with dill water from a jar of Polish dills.

As it was, they were mostly all gone in a couple of days, stored in the fridge, but I just wonder whether they would keep safely?
Do you need to do anything special? Is the vinegar enough preservative or do you have to boil them or something?

My mom has a recipe similar to that. I believe her recipe claims that one can store the mushrooms in the fridge for up to 3 weeks.

They don’t usually last that long, due to people enjoying the marinated mushrooms.

My mother used to pickle veggies using Wishbone’s Italian dressing. They seemed to last months and months and months.
Either that or my mother kept replenishing them. :stuck_out_tongue: